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.

When using the Longtable package in a LaTeX Beamerdocument, how can I create a table header shown on every slide containing table contents? The following approach seems not to work:

\begin{frame}[allowframebreaks]{title}
\begin{longtable}{cc}
a & b \\ \endfirsthead
c & d \\ \endhead
fooooooooooo & Bar\\ 
fooooooooooo & Bar\\ 
...
\end{longtable}
\end{frame}

The headerline with "c d" is never shown. This behaviour doesn't seem right.

share|improve this question

migrated from stackoverflow.com Jun 30 '11 at 18:27

This question came from our site for professional and enthusiast programmers.

    
While allowframebreaks technicly works it is declared as 'evil' in the beamer manual. You should always manually decide what and how much is placed on which slide to avoid overfilled slides. So I would recommend to simply use two (or more) tabulars on the same number of slides. –  Martin Scharrer Jun 30 '11 at 20:47
add comment

1 Answer

use another package:

\documentclass{beamer}
\usepackage{xtab}

\begin{document}

\begin{frame}[plain,allowframebreaks]{title}
\tablefirsthead{a & b \\}
\tablehead{c & d \\}

\begin{xtabular}{cc}
fooooooooooo & Bar\\ 
fooooooooooo & Bar\\ 
...
\end{xtabular}
\end{frame}
share|improve this answer
add comment

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.