Graphics, Figures & Tablesbooktabs | Rules don't show up

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
AKlatex
Posts: 3
Joined: Thu Jun 21, 2012 3:04 am

booktabs | Rules don't show up

Post by AKlatex »

I have a problem displaying the ruled lines on my table this is the preamble stuff.

Code: Select all

\documentclass[aps,pra,reprint,groupedaddress]{revtex4-1}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{amsmath}
\usepackage[caption=false]{subfig}
\usepackage{subfig}
\usepackage{amssymb}
\usepackage{booktabs}
This is a table that is compiled without a warning message but no lines appear:

Code: Select all

\begin{table}
\centering
\begin{tabular}{ccc}
\toprule
\multicolumn{3}{r}{$k_{20}+k_{21}$($\times$10$^{-9}$cm$^{3}$s$^{-1}$)} \\
\cmidrule{2-3}Neutral & Default & New \\
Kr &4.02 $\pm$ 0.46~ & 4.17 $\pm$ 0.49 \\
Xe & 6.11 $\pm$ 0.72& 6.39 $\pm$ 0.76\\
\bottomrule
\end{tabular}
\caption{\label{comparison}}
\end{table}
OUT:
k20 + k21(×10−9cm3s−1)
Neutral Default New
Kr 4.02 ± 0.46 4.17 ± 0.49
Xe 6.11 ± 0.72 6.39 ± 0.76
Last edited by Stefan Kottwitz on Thu Jun 21, 2012 7:59 am, edited 1 time in total.

Recommended reading 2024:

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

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

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

booktabs | Rules don't show up

Post by CrazyHorse »

revtex has its own rule macros. Do not load the booktabs package and use:

Code: Select all

\begin{tabular}{ccc}\toprule
    
 \multicolumn{3}{r}{$k_{20}+k_{21}$($\times$10$^{-9}$cm$^{3}$s$^{-1}$)} \\\cline{2-3}
    
  Neutral & Default & New \\\colrule
    
  Kr &4.02 $\pm$ 0.46~ & 4.17 $\pm$ 0.49 \\
    
  Xe & 6.11 $\pm$ 0.72& 6.39 $\pm$ 0.76\\\botrule
    
\end{tabular}

AKlatex
Posts: 3
Joined: Thu Jun 21, 2012 3:04 am

booktabs | Rules don't show up

Post by AKlatex »

Thanks that actually helped. I had to use

Code: Select all

\begin{ruledtabular}
      ....
      \end{ruledtabular}
In place of

Code: Select all

\toprule 
and

Code: Select all

\botrule
but it worked
Post Reply