2

My 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}

The result:

enter image description here

Now how can I vertically align the cell containing 'Conventional NDI with linear PID-control'? My table is actually very big, and I will have to make all the entries in the first column vertically aligned.

2 Answers 2

1

enter image description here

You have forced centre alignment of your inner tables, but you want top alignment.

\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}
0

It may seem counterintuitive, but bottom aligning the column works. I have emended your example, including the array packaage and changing the table spec to \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}

enter image description here

6
  • If I run your MWE, the text 'Conventional NDI with linear PID-control' is still not aligned vertically with respect to its cell.
    – Pietair
    Nov 4, 2014 at 18:28
  • 2
    b{4cm} does not produce vertical centering within the cell, but m{4cm} does. This functionality is provided by array, so @penguinpreferred is correct that you should load that. Nov 4, 2014 at 18:33
  • Hmm. I can't explain that. I've added an image to my answer to show what result I get with that exact code.
    – Nigel
    Nov 4, 2014 at 18:33
  • I think what's unclear is what @Pietair means by "vertically aligned." I interpreted that to mean "vertically centered" (vertically aligned with the center of cell) which can be achieved using m{}. Using b{} will cause the text to be vertically aligned with the top of the cell. Nov 4, 2014 at 18:36
  • Absolutely. Either could be "correct", depending on what @Pietair means.
    – Nigel
    Nov 4, 2014 at 18:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .