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.

In list of tables,longtable caption repeats equal to the number of pages occupied by a long table. i only want to show the caption and pagne number once for a whole long table. enter image description here

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Probably \caption is inside the table head?

Then put it into \endfirsthead and use an empty optional argument for the \caption in the header of the following pages (\endhead). An empty optional argument \caption[] suppresses the entry in the table of contents.

Example:

\documentclass{article}
\usepackage[a6paper]{geometry}

\usepackage{longtable}

\begin{document}
\listoftables
\newpage
\begin{longtable}{l}
  \caption{Workers}
\endfirsthead
  \caption[]{Workers}
\endhead
  1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\
  11\\12\\13\\14\\15\\16\\17\\18\\19\\20\\
  21\\22\\23\\24\\25\\26\\27\\28\\29\\30\\
  31\\32\\33\\34\\35\\36\\37\\38\\39\\40\\
  41\\42\\43\\44\\45\\46\\47\\48\\49\\50\\
\end{longtable}
\end{document}

The table spans three pages, but the table of contents only lists one entry:

\listoftables

Also a table header can be given and repeated on each page:

\documentclass{article}
\usepackage[a6paper]{geometry}

\usepackage{longtable}

\begin{document}
\listoftables
\newpage
\begin{longtable}{l}
  \caption{Workers}\\
  Head\\
  \hline
\endfirsthead
  \caption[]{Workers}\\
  Head\\
  \hline
\endhead
  1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\
  11\\12\\13\\14\\15\\16\\17\\18\\19\\20\\
  21\\22\\23\\24\\25\\26\\27\\28\\29\\30\\
\end{longtable}
\end{document}

Page 1 Page 2 Page 3

share|improve this answer
    
i noticed a problem, I am repeating the first row of my table on each row as well as the caption. when using this command, it removes the first row of the table on first page. –  Ahmad May 29 at 5:25
    
@Ahmad: Also a table header can be given along with the caption, if I understood your problem correctly, see updated answer. –  Heiko Oberdiek May 29 at 8:06

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.