我有以下原理图代码:
\begin{landscape}
\begin{longtable}[t]{p{0.10\linewidth}| p{0.20\linewidth} p{0.20\linewidth} p{0.20\linewidth} p{0.20\linewidth}}
\hline
{\bf Country} & {\bf Column 1} & {\bf Column 2} & {\bf Column 3} & {\bf Column 4} \\ \hline
Brazil &
\begin{enumerate}[leftmargin=*, itemsep=0pt,label={\arabic*)}]
\item x
\item y
\item z
\end{enumerate} &
\begin{enumerate}[leftmargin=*, itemsep=0pt, label={\arabic*)}]
\item x
\item y
\item z
\end{enumerate} &
\begin{enumerate}[leftmargin=*, itemsep=0pt, label=]
\item a
\item b
\item c
\item d
\end{enumerate} &
\begin{enumerate}[leftmargin=*, itemsep=0pt, label=]
\item a
\item b
\end{enumerate} \\ \hline
\end{longtable}
\end{landscape}
我希望所有单元格都对齐到顶部,即与“Brazil”在同一行。我以为使用“{p{0.10\linewidth}| p{0.20\linewidth} ....”可以解决这个问题,但事实并非如此。有人有解决这个问题的优雅方法吗?
答案1
\documentclass[a4paper]{article}
\usepackage{longtable}
\usepackage{enumitem} % for nice list
\usepackage{pdflscape}
\begin{document}
\begin{landscape}
\setlist{nosep=0pt,
leftmargin=*,
after=\end{minipage}, % <---
before=\begin{minipage}[t]{\linewidth} % <---
}
%
\begin{longtable}{p{0.10\linewidth}| p{0.20\linewidth} p{0.20\linewidth} p{0.20\linewidth} p{0.20\linewidth}}
\hline
\textbf{Country} & \textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} & \textbf{Column 4} \\ \hline
Brazil &
\begin{enumerate}
\item x
\item y
\item z
\end{enumerate} &
\begin{enumerate}
\item x
\item y
\item z
\end{enumerate} &
\begin{enumerate}[label=]
\item a
\item b
\item c
\item d
\end{enumerate} &
\begin{enumerate}
\item a
\item b
\end{enumerate} \\ \hline
\end{longtable}
\end{landscape}
\end{document}