latexbeamer

Tablehead repeats in next slide even if \tablelasttail{} is given - supertabular in latex beamer


I have used supertabular in latex beamer with allowframebreaks. Added the \tablehead, \tabletail and \tablelasttail. The table head is repeated in every slide. But the problem is after the last content the table head is repeating to the next slide. What to do?

\begin{frame}[t,allowframebreaks,plain]{Literature Review}         
    \small
    \tablehead{
    \hline
    {\textbf{No}} & \textbf{Paper} & \textbf{Observations} & \textbf{Limitations}\\
    \hline}
    \tabletail{\hline}
    \tablelasttail{\hline} 
   
  \begin{supertabular}{|p{0.3cm}|p{3cm}|p{3.5cm}|p{3cm}|} 
   1 & A & A & A\\
   2 & B & B & B\\
   3 & C & C & C\\
   4 & D & D & D\\
   5 & E & E & E\\
   ...
   11 & Z & Z & Z\\
  \end{supertabular}  
  
\end{frame}

For the first 11 frames it worked well but I got a twelfth frame with heading only. How to avoid this?

enter image description here


Solution

  • You could use \shrinkheight{...} make make either more or less room on the previous slide:

    \documentclass{beamer}
    
    \usepackage{supertabular}
    
    \begin{document}
    
    \begin{frame}[t,allowframebreaks,plain]{Literature Review}         
        \small
        \tablehead{
        \hline
        {\textbf{No}} & \textbf{Paper} & \textbf{Observations} & \textbf{Limitations}\\
        \hline}
        \tabletail{\hline}
        \tablelasttail{\hline} 
      \begin{supertabular}{|p{0.5cm}|p{3cm}|p{3.0cm}|p{2.5cm}|} 
       1 & A & A & A\\
       2 & B & B & B\\
       3 & C & C & C\\
       4 & D & D & D\\
       5 & E & E & E\\
       6 & Z & Z & Z\\
       7 & Z & Z & Z\\
       8 & Z & Z & Z\\
       9 & Z & Z & Z\\
       10 & Z & Z & Z\\
       11 & Z & Z & Z\\
       12 & Z & Z & Z\\
       13 & Z & Z & Z\\
       14 & Z & Z & Z\\
       15 & Z & Z & Z\\
       16 & Z & Z & Z\\\shrinkheight{1cm} 
       17 & Z & Z & Z\\
       18 & Z & Z & Z\\
       19 & Z & Z & Z\\
       20 & Z & Z & Z\\
      \end{supertabular}  
      
    \end{frame}
    
    
    \end{document}
    

    enter image description here enter image description here