Graphics, Figures & TablesHorizontal line in a table spanning over several columns

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kapowza
Posts: 19
Joined: Fri Jan 30, 2009 3:32 pm

Horizontal line in a table spanning over several columns

Post by kapowza »

I have a table with 5 columns. Is there any way to make a horizontal line that runs through columns 1 and 2, skips column 3 and runs through columns 4 and 5?

Recommended reading 2024:

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

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

Lucia
Posts: 36
Joined: Wed Dec 31, 2008 9:03 pm

Horizontal line in a table spanning over several columns

Post by Lucia »

Yes, there is. Just use the command \cline{m-n} after the rows you need. M and N are the number of the columns with horizontal rules. Thus, using your example, you just have to type

Code: Select all

\cline{1-2}\cline{4-5}
in order to get an horizontal line through the table, except in column 3.

Hope this helps.

Lucia
Post Reply