2

Consider this example:

\documentclass{report}
\usepackage{makecell}
\usepackage{lipsum}
\begin{document}
\begin{tabular}{p{3cm}p{3cm}}
  \lipsum[1][1] & \lipsum[1][2-4]\\
  \lipsum[1][5] & \makecell[l]{A\\B\\C\\D\\E}
\end{tabular}
\end{document}

The output is:

enter image description here

As can be seen, the use of \makecell altered the vertical alignment in the rest of the row. How to bring the vertical alignment of the affected row in harmony with the rest of the table (starting from top)?

2

The default for \makecell is centred, both vertically and horizontally. You could use \makecell[lt]{A\\B\\C\\D\\E}.

However, why use \makecell in a pcolumn type? You may as well use this code:

\documentclass{report}
\usepackage{makecell}
\usepackage{lipsum}
\newcommand{\nl}{\newline}

\begin{document}

\begin{tabular}{p{3cm}p{3cm}}
  \lipsum[1][1] & \lipsum[1][2-4]\\
  \lipsum[1][5] & A\nl B\nl C\nl D\nl E
\end{tabular}

\end{document}

enter image description here

  • you have a dangling } in C\nl D\nl E} – Viesturs Jan 19 at 21:28
2

If you want to use \makecell use t option:

\documentclass{report}
\usepackage{makecell}
\usepackage{lipsum}
\begin{document}
\begin{tabular}{p{6cm}p{6cm}}
  \lipsum[1][1] & \lipsum[1][2-4]\\
  \lipsum[1][5] & \makecell[tl]{A\\B\\C\\D\\E}
\end{tabular}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.