Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a number of tables formatted in a LaTeX document. I want to put these tables into a beamer class with one table/slide and perserve the table formatting. When I compile my document, everything behaves as expected, however my tables do not maintain their original formatting. Specifically, I do not see my bottomrule lines. Here is my MWE:

\usepackage{booktabs, caption}
\documentclass{beamer} 
\title{Here is my Title} 
\author{drbunsen} 
\date{October 1st, 2011} 

\begin{document}

\begin{frame} 
\frametitle{My Slide Title}
\begin{table}[h]
\setlength{\arrayrulewidth}{1.5px}
\setlength{\tabcolsep}{10pt}
\centering
\begin{tabular}{lcccccc} \bottomrule
H1 & H2 & H3 & H4 & H5 & H6 & H7\\ \bottomrule
a & b & c & d & e & f & g \\
& 2 & 3 & 4 & 5 & 6 & 7 \\
\bottomrule
\end{tabular}
\caption{This is my caption}
\end{table}
\end{frame} 
\end{document}

How can I perserve my LaTeX table formatting/styling in beamer? Thanks in advance for the help.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Load the packages (booktabs, caption) after \documentclass, not before.

I can confirm that errors are produced and lines are missing if you load in the wrong order. However, in the right order all is fine:

\documentclass{beamer} 
\usepackage{booktabs}
\usepackage{caption}

table on beamer slide

share|improve this answer
    
Thanks Stefan, Your solution worked! –  dr.bunsen Oct 1 '11 at 13:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.