[Tex/LaTex] Set Table height to fixed height

heightmarginstables

I found the \resizebox command but I don't want to scale my table. I want to be able to set it to X height and have it stay there. Is there a way to set the height of a table and leave it there no matter how many rows?

I ask since the table in the middle of my document will always vary and sometimes have one row and sometimes have 4 rows. When I set it up to one row with measurements and then add more rows it moves my items below it.

I want that when I add more rows to the table in the middle it doesn't move the content below it. So I was figuring that setting the height to begin with will solve that, I just can't find how to set that height parameter.

This is my table:

\begin{tabular}{ @{} p{0.5in} p{3.25in} p{0.5in} @{} }
\textbf{date} & \textbf{date} & \textbf{date} \\
\end{tabular}

Best Answer

You can put your table in a minipage with a fixed height:

\noindent\begin{minipage}[t][4in][t]{\textwidth}
\centering
\begin{tabular}{ @{} p{0.5in} p{3.25in} p{0.5in} @{} }
\textbf{date} & \textbf{date} & \textbf{date} \\
\end{tabular}
\end{minipage}

The first optional argument tells what's the alignment of the minipage with respect to the context (it may well be also c). The second optional argument tells how much vertical size is reserved to the minipage (just figure out what you need). The third optional argument is the "inner alignment": it can be t for "top alignment", c for "center alignment", b for "bottom alignment and also s for "stretch all vertical spaces"; here the alignment is with respect to the top and the bottom of the reserved space. The s option doesn't make sense in this case.

Related Question