LyXpackage booktabs, tables and \bottomrule

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Scot_B
Posts: 4
Joined: Mon Jun 02, 2008 11:04 pm

package booktabs, tables and \bottomrule

Post by Scot_B »

Hi,

I'm using booktabs and I'm trying to get the \bottomrule to work, i.e. I want a thicker line at the bottom of the table. I can not figure out where in my table the command should go. If I put it in the 'g' cell it makes a line above the 'ghi' cells. If I put it as in the picture it adds another cell below the line. I'm also coloring every other line. I've tried everything I can think of, so any help would be appreciated.

lyx: 2.0.6

preamble:

\usepackage{color}
\usepackage{booktabs}

% used for colored table rows
\usepackage[table]{xcolor}
% alternate rowcolors for all tables
\let\oldtabular\tabular
\let\endoldtabular\endtabular
\renewenvironment{tabular}{\rowcolors{2}{}{TerraTerra}\oldtabular}{\endoldtabular}
Attachments
ex.gif
ex.gif (10.45 KiB) Viewed 21245 times

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

package booktabs, tables and \bottomrule

Post by Johannes_B »

It seems you are confident with code and LyX. Can you try to prepare a minimal working example? This way we can reproduce the exact behaviour.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Scot_B
Posts: 4
Joined: Mon Jun 02, 2008 11:04 pm

Re: package booktabs, tables and \bottomrule

Post by Scot_B »

Here is a minimum lyx file of the two tables I talked about.
Attachments
tables.lyx
(6.02 KiB) Downloaded 679 times
Scot_B
Posts: 4
Joined: Mon Jun 02, 2008 11:04 pm

Re: package booktabs, tables and \bottomrule

Post by Scot_B »

Adding a "%" at the end of the last line works, it should read:

\tabularnewline\bottomrule[2pt]%

The table now has a thicker top and bottom line, which you can specify the thickness of, and with colored table lines. Hope this helps someone in the future.
Post Reply