表格中表格的顶部对齐

表格中表格的顶部对齐

我在使用 latex 时遇到了一个小问题 :) 。我想将枚举放入表格中,但这行不通。然后我研究了一种解决方法,最终得到了以下代码。

我的问题:单元格未在顶部对齐。我读了一些关于添加\vfill或 的内容\vspace{0pt}。但这不起作用。

这是我的代码:

\documentclass[parskip=half, fleqn]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}

\begin{document}
    \begin{center}
        \begin{tabular}{p{.27\textwidth}|p{.27\textwidth}|p{.27\textwidth}}
        OEM     & MNO       & 3PL\\ \hline
        \begin{tabular}{@{\tabitem}p{.22\textwidth}}
            Manufacturing at low cost\\
            Direct connections to suppliers and local distributors\\
        \end{tabular}
        %\vspace{15em}
    %
        &\begin{tabular}{@{\tabitem}p{.22\textwidth}}
            Customer relations\\
            Distribution network (stores, website, etc.)\\
            Brand management and marketing\\
            network technology
        \end{tabular} %\vspace{0pt}
    %
        &\begin{tabular}{@{\tabitem}p{.22\textwidth}}
            Logistics services and solutions \\
            Value added IT\\
            After sales services\\

    \end{tabular}
    \end{center}
\end{document}

当然,只要达到目的,它不一定非得是这个样子 :P 希望你有个主意。非常感谢你的想法

最好的

答案1

enumerate像或这样的列表itemize不能直接作为表格单元格的内容出现 - 它们必须包含在或中\parbox,甚至更好,使用p{somewidth}-列说明符。

\documentclass[parskip=half, fleqn]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{array}
\usepackage{ragged2e}%
\newcolumntype{P}[1]{>{\RaggedRight\arraybackslash}p{#1}}
\begin{document}
\begin{center}
  \begin{tabular}{p{.27\textwidth}|p{.27\textwidth}|p{.27\textwidth}}
    OEM     & MNO       & 3PL\tabularnewline \hline
      \begin{enumerate}
      \item Manufacturing at low cost
      \item Direct connections to suppliers and local distributors
         \end{enumerate}
      &
      \begin{enumerate}
      \item Customer relations
      \item Distribution network (stores, website, etc.)
      \item Brand management and marketing
      \item network technology
      \end{enumerate} 
      &
      \begin{enumerate}
      \item Logistics services and solutions 
      \item Value added IT
      \item After sales services
      \end{enumerate}\tabularnewline
  \end{tabular}
\end{center}

\begin{center}
  \begin{tabular}{P{.27\textwidth}|P{.27\textwidth}|P{.27\textwidth}}
    OEM     & MNO       & 3PL\tabularnewline \hline
      \begin{enumerate}
      \item Manufacturing at low cost
      \item Direct connections to suppliers and local distributors
         \end{enumerate}
      &
      \begin{enumerate}
      \item Customer relations
      \item Distribution network (stores, website, etc.)
      \item Brand management and marketing
      \item network technology
      \end{enumerate} 
      &
      \begin{enumerate}
      \item Logistics services and solutions 
      \item Value added IT
      \item After sales services
      \end{enumerate}\tabularnewline
  \end{tabular}
\end{center}

\end{document}

在此处输入图片描述

答案2

谢谢 Christian!这就是答案。对于其他所有人,以下是工作代码:

\documentclass[parskip=half, fleqn]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}

\begin{document}
    \begin{center}
        \begin{tabular}{p{.27\textwidth}|p{.27\textwidth}|p{.27\textwidth}}
    \multicolumn{1}{c|}{OEM}        & \multicolumn{1}{c|}{MNO}      & \multicolumn{1}{c}{3PL}\\ \hline
    \begin{itemize}
        \item   Manufacturing at low cost
        \item Direct connections to suppliers and local distributors
    \end{itemize}
%
    &\begin{itemize}
    \item   Customer relations
    \item   Distribution network (stores, website, etc.)
    \item   Brand management and marketing
    \item   network technology
    \end{itemize}
%
    &\begin{itemize}
    \item   Logistics services and solutions
    \item   Value added IT
    \item   After sales services
    \item   Inventory management\,/\,warehousing
    \end{itemize} \\
\end{tabular}
\end{center}

相关内容