我的 MWE:
\documentclass{article}
\usepackage{lscape}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\begin{document}
\begin{landscape}
\begin{table}[ht]
\small
\begin{tabular}{|p{4cm}|p{9cm}|p{8.2cm}|}
\hline
\textbf{Control Method} & \textbf{Advantages} & \textbf{Disadvantages} \\ \hline
Conventional NDI with linear PID-control & \begin{tabular}[c]{@{}l@{}} \tabitem The absence of any need for gain scheduling. \\ \tabitem Decoupling between the input-output relations. \end{tabular} & \begin{tabular}[c]{@{}l@{}}\tabitem Model and parameters must be accurately known. \\ \tabitem Complete knowledge of the states is required. \\ \tabitem Dual loop design assumes time-scale separation. \end{tabular} \\ \hline
\end{tabular}
\end{table}
\end{landscape}
\end{document}
结果:
现在,我该如何垂直对齐包含“带线性 PID 控制的传统 NDI”的单元格?我的表格实际上非常大,我必须使第一列中的所有条目垂直对齐。
答案1
您已强制内部表格居中对齐,但您希望顶部对齐。
\documentclass{article}
\usepackage{lscape}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\begin{document}
\begin{landscape}
\begin{table}[ht]
\small
\begin{tabular}{|p{4cm}|p{9cm}|p{8.2cm}|}
\hline
\textbf{Control Method} & \textbf{Advantages} & \textbf{Disadvantages} \\ \hline
Conventional NDI with linear PID-control & \begin{tabular}[t]{@{}l@{}} \tabitem The absence of any need for gain scheduling. \\ \tabitem Decoupling between the input-output relations. \end{tabular} & \begin{tabular}[t]{@{}l@{}}\tabitem Model and parameters must be accurately known. \\ \tabitem Complete knowledge of the states is required. \\ \tabitem Dual loop design assumes time-scale separation. \end{tabular} \\ \hline
\end{tabular}
\end{table}
\end{landscape}
\end{document}
答案2
这似乎违反直觉,但将列底部对齐是可行的。我已修改您的示例,包括array
包并将表规范更改为\begin{tabular}{|b{4cm}|p{9cm}|p{8.2cm}|}
。
\documentclass{article}
\usepackage{lscape}
\usepackage{array}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\begin{document}
\begin{landscape}
\begin{table}[ht]
\small
\begin{tabular}{|b{4cm}|p{9cm}|p{8.2cm}|}
\hline
\textbf{Control Method} & \textbf{Advantages} & \textbf{Disadvantages} \\ \hline
Conventional NDI with linear PID-control & \begin{tabular}[c]{@{}l@{}} \tabitem The absence of any need for gain scheduling. \\ \tabitem Decoupling between the input-output relations. \end{tabular} & \begin{tabular}[c]{@{}l@{}}\tabitem Model and parameters must be accurately known. \\ \tabitem Complete knowledge of the states is required. \\ \tabitem Dual loop design assumes time-scale separation. \end{tabular} \\ \hline
\end{tabular}
\end{table}
\end{landscape}
\end{document}