1

I am currently writing an article for submission in a journal, which has a custom document class. I have a very long table, so a longtable is needed in this case, but it contradicts the formatting guidelines set inside the document class (specifically the custom caption command). Is there a "long" version of tabular so that I can use the specific commands of the table environment of the required document class?

For reference, I am using nrc1 document class, and it has custom caption command \topcaption.

MWC:

\documentclass[preprint]{nrc1}
\usepackage{booktabs,longtable}

\begin{document}
\title{The Title}
\author{The Author}
\address{The Address}

\maketitle

Insert text here.

\begin{table}[!h]
\topcaption{Caption Title }
\begin{tabular}{crrr}
\toprule
ColA & ColB & ColC & ColD \\
\midrule
a1 & b1 & c1 & d1\\
a2 & b2 & c2 & d2\\
\bottomrule
\end{tabular}
\label{tab:tab1}
\end{table}



\begin{longtable}{crrrrrrrr}
\caption{Short Title.}\\
\toprule
C1 & C2 & C3 & C4 & C5 & C6 & C7 & C8 & C9 \\
\midrule\endfirsthead

\toprule
C1 & C2 & C3 & C4 & C5 & C6 & C7 & C8 & C9 \\
\midrule\endhead

\midrule\multicolumn{9}{r}{(continued on next page)}\endfoot

\bottomrule\endlastfoot

$a1$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a2$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx\\
$a3$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a4$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a5$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a6$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \midrule

$a1$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a2$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx\\
$a3$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a4$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a5$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a6$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \midrule


$a1$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a2$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx\\
$a3$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a4$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a5$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a6$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \midrule

$a1$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a2$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx\\
$a3$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a4$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a5$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a6$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \midrule

$a1$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a2$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx\\
$a3$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a4$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a5$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a6$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \midrule

$a1$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a2$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx\\
$a3$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a4$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a5$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx \\
$a6$ & xxx.xx & xxx.xx & --& --& --& --& --& xx.xxxx 

\end{longtable}

\end{document}
  • 2
    Welcome! Please provide a link to the class and code for a minimal document we can use to reproduce the issue. You cannot use table with a multipage anything because table is a float and floats are boxes which can't contain page breaks. You could split the table manually. Or you can use one of the multipage packages (such as longtable) outside a float. But multipage floats are almost a contradiction in terms. – cfr Aug 4 '17 at 22:49
  • Updated the post @cfr. Also, the nrc1 class is already pre-installed (I think). Re table, I am aware that it's a float, but manually splitting the table is cumbersome when you are still editing the whole manuscript. I am thinking of instead customizing the caption format, but maybe there are alternative ways not resorting to creating too complex commands that will contradict the document class. – jjv Aug 5 '17 at 0:46
  • The use of \topcaption indicates that nrcl may be a KOMA variant. See tex.stackexchange.com/questions/22177/… – John Kormylo Aug 5 '17 at 2:40
  • Ah, yes. Part of the nrc package? @JohnKormylo Parasitic on article, it seems. – cfr Aug 5 '17 at 4:04
  • I like the copyright note at the beginning of the file :-) – Johannes_B Aug 5 '17 at 5:46

Your Answer

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

Browse other questions tagged or ask your own question.