Graphics, Figures & TablesGet a table with rows having equal heights

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Get a table with rows having equal heights

Post by omkardpd »

Hi,

How do I have a table with rows having equal heights? Because of content of different heights in each row, the table looks weird. Is there a command by which I can have all the rows of the same height?

Thank you,

Omkar

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Get a table with rows having equal heights

Post by localghost »

You can stretch the lines of a tabular (and array) environment globally by adding a line to the preamble.

Code: Select all

\renewcommand{\arraystretch}{2}
This line inside a table environment keeps the effect local.

Code: Select all

\begin{table}[!ht]
  \centering
  \caption{A stretched table}\label{tab:stretched}
  \renewcommand{\arraystretch}{2}
  \begin{tabular}{ccc}
    % contents of the table
  \end{tabular}
\end{table}

Best regards
Thorsten¹
Post Reply