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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
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