LyXHow to add height to a table row?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
redda2
Posts: 4
Joined: Tue Oct 06, 2009 12:35 pm

How to add height to a table row?

Post by redda2 »

Hi,

Currently im doing some big maths equations inside a table.

The problem is that the row lines are way too close to the text. Is there any way to increase the row height? (Adding some padding to the top and bottom of each row).

Cheers.

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

How to add height to a table row?

Post by Stefan Kottwitz »

Hi redda2,

welcome to the board!
You could redefine \arraystretch, the factor for the default distance of the rows, for example:

Code: Select all

\renewcommand{\arraystretch}{1.5}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Its default value is 1.

Or use \extrarowheight, \strut or \rule etc. like described here: Spacing lines in tables.

Stefan
LaTeX.org admin
redda2
Posts: 4
Joined: Tue Oct 06, 2009 12:35 pm

Re: How to add height to a table row?

Post by redda2 »

Hi,

Thanks your your reply. Im really noob with code and was wondering where do I paste this code?

Im using lyx 1.6.2 btw.

Cheers.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

How to add height to a table row?

Post by Stefan Kottwitz »

Insert this into the document preamble:

Code: Select all

\usepackage{array}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Later in the document, right before the tabular/table (inside a table environment) you could insert an ERT field:

Code: Select all

\setlength{\extrarowheight}{length}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This would increase the height of all rows of that table. For the length you could insert a value like 10pt, 1ex etc. If you want to adjust only certain rows it could be done another way.

Stefan
LaTeX.org admin
redda2
Posts: 4
Joined: Tue Oct 06, 2009 12:35 pm

Re: How to add height to a table row?

Post by redda2 »

Hey Thanks it works!

The only problem is that it only adds height to the top padding. Is it possible to add right to both above and below the text?

Cheers.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

How to add height to a table row?

Post by Stefan Kottwitz »

Try the effect of

Code: Select all

\renewcommand{\arraystretch}{1.5}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
instead of redefining \extrarowheight, at the same place.

Stefan
LaTeX.org admin
redda2
Posts: 4
Joined: Tue Oct 06, 2009 12:35 pm

Re: How to add height to a table row?

Post by redda2 »

Sweet.

Thanks for your help :D
Post Reply