I'm trying to create a multi-page table with all cells having the same height (as well as certain fixed widths) so that certain manual cut-and-paste operations are a lot easier. One issue is that one column in particular is text-heavy and should line-break within the cell. As I don't want it justified, I looked into alternatives such as Fixed column-width table with text left-aligned in cells. This is doing exactly what I want for horizontal alignment.
For vertical alignment, I've looked at How to specify a fixed height for all rows in a table? and the \vphantom
method detailed in the above link doesn't seem to be working.
Here's what I'm currently working with:
\documentclass[11pt]{article}
\usepackage{array}
\newcolumntype{P}[1]{>{\raggedright\hspace{0pt}\arraybackslash}p{#1}}
\def\Z{\vphantom{\parbox[c]{1.7in}{\Huge Something Long}}}
\begin{document}
\begin{tabular}{| c || P{0.5in} || P{0.5in} || P{5in} |}\hline
1. \Z &&& Long long long long long long long long long
long long long long long long long text \\\hline
2. \Z &&& More long long long long long long long long
long long long long long long long text \\\hline
\end{tabular}
When I compile, the cells do not have a uniform height, and none of them are as large as 1.7 inches vertically. So this suggests that somehow the \vphantom
method is failing.
Does anybody know of a relatively straightforward solution to this problem?
Best Answer
In this example each cell has a height of 3cm: