0

I have multiple ctable which are filling about a page each. One of them is smaller and therefore used as the first one so that a section title can be printed on the top of the page.

Now ctable makes automatically a new page, leaving the section title on a blank page and starting the table one page after. If I put the same code into a tabular environment everything works like a charme.

Here is the page head when using a ctable (noting the space above the table): page with ctable

Her is the page head when using a tabular (section title appears): page with tabular

MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{ctable}

\begin{document}

\section*{Section with ctable}

\ctable[notespar,caption={Caption},botcap]{cc}
{}{
\toprule
TEST & TEXT\\
\midrule
test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\
\bottomrule
}

\newpage
\section*{Section with tabular}
\begin{tabular}{cc}
\toprule
TEST & TEXT\\
\midrule
test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\test& text \\
\bottomrule
\caption{Caption}
\end{tabular}

\end{document}
1

Adding the specifier pos=hb helps and places the ctable directly under the section title.

  • Doesn't work here; better use pos=!h. Also better use \FL for \toprule, \ML for \\\midrule, \LL for \\\bottomrule, \NN for ` \\ , And: \caption` inside a tabular environment generates an error... – Wybo Dekker Nov 21 '16 at 15:13

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.