7

I am writing an article which has a long table with many rows. I would like to divide this table for multiple pages but I can not change the captions of these tables like "Table 1: Blablabla" and for the second page "Table 1 Continued: Blablabla" and so on. My MWE and its output.

I want to remove "Continued" from pages after the first.

\documentclass{article}

\usepackage[left=2.5cm,top=2.5cm,right=2.5cm,bottom=2.5cm,bindingoffset=0.1cm]{geometry}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage[font=small,labelfont=bf]{caption}

\begin{document}

\begin{table}[!htb]
\centering
\caption {Some Members of the Suggested Estimator}
\label{Tab:1}
\smallskip
\begin{tabular}{c  c  c }
\toprule
A subset of $\overline{y}_{NH}$ & $\textbf{a}$ & $\textbf{b}$\\
\midrule
test1 & 1 & 0 \\
\midrule
test2 & 1 & 1 \\
\midrule
test3 & \newline 1 & \newline $\beta_{2} \left(x\right)$ \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}[!htbp]
\centering
\caption* {\textbf{Table 1 Continued:} Blablabla}
\smallskip
\begin{tabular}{c  c  c }
\toprule
A subset of $\overline{y}_{NH}$ & $\textbf{a}$ & $\textbf{b}$\\
\midrule
test4 & $C_{x} $ & $\rho_{yx} $ \\
\midrule
test5 & $\rho _{yx} $ & $C_{x} $ \\
\midrule
test6 & $\rho _{yx} $ \\
\bottomrule
\end{tabular}
\end{table}

\end{document}

enter image description here

Can anyone help me about it?

  • You tagged your question with longtable. Did you test it? – Marco Daniel May 20 '13 at 11:34
  • Yes. but the problem is with the caption. – ARAT May 20 '13 at 11:37
  • I followed everything in this topic tex.stackexchange.com/questions/11380/… Everything work perfectly fine BUT I do not want this "...continued" thing. Plus, I do not know how to remove it and change the caption. – ARAT May 20 '13 at 11:54
10

The package longtable allows you to define

  1. a header for the first page by \endfirsthead
  2. a header for all next pages by \endhead
  3. a footer fo all pages expect the last one by \endfoot
  4. a footer for the last page by \endlastfoot.

In your case you can do:

\documentclass{article}

\usepackage[paper=a6paper]{geometry}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage[font=small,labelfont=bf]{caption}

\begin{document}

\begin{longtable}{ccc}
\caption {Some Members of the Suggested Estimator}\label{Tab:1}\\\toprule
\endfirsthead
\caption* {\textbf{Table \ref{Tab:1} Continued:} Blablabla}\\\toprule
\endhead
\endfoot
\bottomrule
\endlastfoot
A subset of $\overline{y}_{NH}$ & $\textbf{a}$ & $\textbf{b}$\\
\midrule
test1 & 1 & 0 \\
\midrule
test2 & 1 & 1 \\
\midrule
test3 & \newline 1 & \newline $\beta_{2} \left(x\right)$ \\
\midrule
A subset of $\overline{y}_{NH}$ & $\textbf{a}$ & $\textbf{b}$\\
\midrule
test4 & $C_{x} $ & $\rho_{yx} $ \\
\midrule
test5 & $\rho _{yx} $ & $C_{x} $ \\
\midrule
test6 & $\rho _{yx} $ \\
A subset of $\overline{y}_{NH}$ & $\textbf{a}$ & $\textbf{b}$\\
\midrule
test1 & 1 & 0 \\
\midrule
test2 & 1 & 1 \\
\midrule
test3 & \newline 1 & \newline $\beta_{2} \left(x\right)$ \\
\midrule
A subset of $\overline{y}_{NH}$ & $\textbf{a}$ & $\textbf{b}$\\
\midrule
test4 & $C_{x} $ & $\rho_{yx} $ \\
\midrule
test5 & $\rho _{yx} $ & $C_{x} $ \\
\midrule
test6 & $\rho _{yx} $ \\
\end{longtable}

\end{document}

enter image description here enter image description here

  • Are you sure that it's the right code? because it does not give me what I want. – ARAT May 20 '13 at 12:00
  • @MuratArat: Please see my edit and my picture. – Marco Daniel May 20 '13 at 12:00
  • But mister, this is not what I am asking. – ARAT May 20 '13 at 12:02
  • @MuratArat: Sorry. Then I misunderstood your question. – Marco Daniel May 20 '13 at 12:03
  • it's ok. I am appeciated for your assistance. – ARAT May 20 '13 at 12:10
0

Taking the code from the link you provided, removing the 'continued...' parts can be done by:

\documentclass{article}
\usepackage{longtable}
\begin{document}      

\begin{longtable}{ccc}
\caption{My caption for this table\label{foo}}\\\hline
Column 1 & Column 2 & Column 3\\\hline
\endfirsthead
\caption* {\textbf{Table \ref{foo} Continued:} Blablabla}
\hline
Column 1 & Column 2 & Column 3\\\hline
\endhead % all the lines above this will be repeated on every page
\hline
\multicolumn{3}{r@{}}{continued \ldots}\\
\endfoot
\hline
\endlastfoot
A & B & C\\     A & B & C\\
A & B & C\\     A & B & C\\
A & B & C\\ \newpage
A & B & C\\     A & B & C\\
A & B & C\\     A & B & C\\
\end{longtable}
\end{document}

If that was the only problem, then you should be able to put your own data in using these header/footer definitions.

  • so far so good but the second table does not have caption. What I want is that second table should have a caption like "Table 1 Continued: Blablabla". however, I cannot find any solution for that – ARAT May 20 '13 at 12:09
  • @MuratArat I added the caption as per your example but that is basically back to Marco's answer – Chris May 20 '13 at 12:14
  • so it's not an answer. I see you understand what I want but it's still not working right. – ARAT May 20 '13 at 12:29
  • @MuratArat Well I am not too sure what is wrong with it. Is the MWE not working or does it not work with your real data? Perhaps the 'Continued...' on the footer of the first table was meant to be kept? I have edited my MWE to include that. – Chris May 20 '13 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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