I'm using longtable
(via online TablesGenerator) but notice the continuation headings are styled slightly differently:
Here is the continuation:
I've already (in the second grab) removed a \bfseries
macro that was bolding the whole continuation caption (also not in my MWE. I tried using a \caption{}
wrapper but that broke the table (as it's actually within a row-wide table cell).
The issues I'd like to fix are noted in the MWE below. Note the MWE cell padding/spacing is slightly tighter than in the screen grabs above (my uni sty doc?) but the closer vertical spacing of the continuation vs. main heading is consistent in both cases and I assume internal to longtable
. Here is the MWE:
\documentclass{report}
\usepackage{longtable}
%from my uni thisis sty file
\usepackage[centerlast,small,sc]{caption}
\begin{document}
This is a specimen table, note the \texttt{caption} macro sets the table caption in smaller than the body font size. Also the main caption sets `Table` in all caps with the non-initial letters in small caps.
\\
I'd ideally like the same styling in the continuation header, \textit{and} with the same slightly larger vertical space as below the main caption---though I don't know if that comes from the \texttt{caption} macro.
% Note: It may be necessary to compile the document several times to get a multi-page table to line up properly
% Please add the following required packages to your document preamble:
% \usepackage{longtable}
% Note: It may be necessary to compile the document several times to get a multi-page table to line up properly
\begin{longtable}[c]{l|rr}
\caption{This is a main caption}
\label{tab:my-tablex}\\
Category & \multicolumn{1}{c|}{Count} & \multicolumn{1}{c}{\%} \\ \hline
\endfirsthead
%
\multicolumn{3}{c}%
{{Table \thetable\ (continued from previous page)}} \\
Category & \multicolumn{1}{c|}{Count} & \multicolumn{1}{c}{\%} \\ \hline
\endhead
%
AA & \multicolumn{1}{r|}{100} & 0.011 \\
AB & \multicolumn{1}{r|}{104} & 0.012 \\
AA & \multicolumn{1}{r|}{108} & 0.012 \\
AB & \multicolumn{1}{r|}{112} & 0.012 \\
AA & \multicolumn{1}{r|}{116} & 0.013 \\
AB & \multicolumn{1}{r|}{120} & 0.013 \\
AA & \multicolumn{1}{r|}{124} & 0.014 \\
AB & \multicolumn{1}{r|}{128} & 0.014 \\
AA & \multicolumn{1}{r|}{132} & 0.015 \\
AB & \multicolumn{1}{r|}{136} & 0.015 \\
AA & \multicolumn{1}{r|}{140} & 0.016 \\
AB & \multicolumn{1}{r|}{144} & 0.016 \\
AA & \multicolumn{1}{r|}{148} & 0.016 \\
AB & \multicolumn{1}{r|}{152} & 0.017 \\
AA & \multicolumn{1}{r|}{156} & 0.017 \\
AB & \multicolumn{1}{r|}{160} & 0.018 \\
AA & \multicolumn{1}{r|}{164} & 0.018 \\
AB & \multicolumn{1}{r|}{168} & 0.019 \\
AA & \multicolumn{1}{r|}{172} & 0.019 \\
AB & \multicolumn{1}{r|}{176} & 0.020 \\
AA & \multicolumn{1}{r|}{180} & 0.020 \\
AB & \multicolumn{1}{r|}{184} & 0.020 \\
AA & \multicolumn{1}{r|}{188} & 0.021 \\
AB & \multicolumn{1}{r|}{192} & 0.021 \\
AA & \multicolumn{1}{r|}{196} & 0.022 \\
AB & \multicolumn{1}{r|}{200} & 0.022 \\
AA & \multicolumn{1}{r|}{204} & 0.023 \\
AB & \multicolumn{1}{r|}{208} & 0.023 \\
AA & \multicolumn{1}{r|}{212} & 0.023 \\
AB & \multicolumn{1}{r|}{216} & 0.024 \\
AA & \multicolumn{1}{r|}{220} & 0.024 \\
AB & \multicolumn{1}{r|}{224} & 0.025 \\
AA & \multicolumn{1}{r|}{228} & 0.025 \\
AB & \multicolumn{1}{r|}{232} & 0.026 \\
AA & \multicolumn{1}{r|}{236} & 0.026 \\
AB & \multicolumn{1}{r|}{240} & 0.027 \\
AA & \multicolumn{1}{r|}{244} & 0.027 \\
AB & \multicolumn{1}{r|}{248} & 0.027 \\
AA & \multicolumn{1}{r|}{252} & 0.028 \\
AB & \multicolumn{1}{r|}{256} & 0.028 \\
AA & \multicolumn{1}{r|}{260} & 0.029 \\
AB & \multicolumn{1}{r|}{264} & 0.029 \\
AA & \multicolumn{1}{r|}{268} & 0.030 \\
AB & \multicolumn{1}{r|}{272} & 0.030 \\
AA & \multicolumn{1}{r|}{276} & 0.031 \\
AB & \multicolumn{1}{r|}{280} & 0.031 \\
AA & \multicolumn{1}{r|}{284} & 0.031 \\ \hline
Totals & \multicolumn{1}{r}{ 9,024} & \\
\end{longtable}
\end{document}
\caption[]{(continued from previous page)}
for the continuation.{{\caption{Table \thetable\ (continued from previous page)}}} \\
it errors immediately with a message "Misplaced \noalign. ...hetable\ (continued from previous page)}}}". I aslo tried putting the continuation caption inside the [ ] of the\caption[]{}
but to the same result. So, I don't think the suggestion is viable. Could I ask you to post the MWE version that works for you as an answer? Many thanks!