2
\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{cals}

\begin{document}

\headheight=81pt

\chead{
\begin{calstable}
\colwidths{{90pt}{90pt}}
\brow
\alignC
\nullcell{ltr}
\cell{b1}
\erow
\brow
\alignC
\nullcell{lr}
\cell{b2}
\erow
\brow
\alignC
\nullcell{lbr}\spancontent{a1, a2, a3}
\cell{b3}
\erow
\end{calstable}
}

\begin{calstable}
\colwidths{{70pt}{70pt}}
%
% 30 row alright,
% 31 row problem, because they begin a new page
%! Incompatible list can't be unboxed.
%\cals@row@dispatch@span ...nvbox \cals@backup@row 
%                                                  \cals@issue@row }\fi \let ...
%l.159 \erow
%           
%? H
%Sorry, Pandora. (You sneaky devil.)
%I refuse to unbox an \hbox in vertical mode or vice versa.
%And I can't open any boxes in math mode.
%
%? X
%No pages of output.
% 
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\end{calstable}

\end{document}
3
  • I haven't solved your problem yet, but I can recommend the longtable and tabu (longtabu environment) packages. They are capable of handling multipage tables.
    – Malipivo
    Mar 24, 2014 at 17:40
  • Thank you for your answer. The cals are capable of handling multipage tables, too. The problem occurs when there is a cals table in header and I merge fields vertically. If I merge fields horizontally, there is no problem. I don't know what couses this problem: whether the cals or the fancyhdr. Mar 24, 2014 at 19:54
  • Just an idea for workaround: try to put longtable/tabu table in the header instead of the actual one and let the table in body stays typeset by the cals package. The tables probably use different variables and there shall be no inference.
    – Malipivo
    Mar 24, 2014 at 20:02

1 Answer 1

1

One idea for workaround: let the other table be typeset by non-cals package. I enclose an example using the basic tabular environment and a preview of those two pages. Then the different dimensions/definitions should not interfere.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{cals}

\begin{document}
\headheight=81pt

\fancyhead[C]{%
\begingroup
\renewcommand\arraystretch{1.5}
\begin{tabular}{|c|c|c|}
\hline
Hello&World&!!!\\ \hline
!!!&Hello&World\\ \hline
World&!!!&Hello\\ \hline
\end{tabular}
\endgroup
\ifx\relax
\begin{calstable}
\colwidths{{90pt}{90pt}}
\brow
\alignC
\nullcell{ltr}
\cell{b1}
\erow
\brow
\alignC
\nullcell{lr}
\cell{b2}
\erow
\brow
\alignC
\nullcell{lbr}\spancontent{a1, a2, a3}
\cell{b3}
\erow
\end{calstable}%
\fi
}%End of \fancyhead...

\begin{calstable}
\colwidths{{70pt}{70pt}}
%
% 30 row alright,
% 31 row problem, because they begin a new page
%! Incompatible list can't be unboxed.
%\cals@row@dispatch@span ...nvbox \cals@backup@row 
%                                                  \cals@issue@row }\fi \let ...
%l.159 \erow
%           
%? H
%Sorry, Pandora. (You sneaky devil.)
%I refuse to unbox an \hbox in vertical mode or vice versa.
%And I can't open any boxes in math mode.
%
%? X
%No pages of output.
% 
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\brow
\cell{column1}
\cell{column2}
\erow
\end{calstable}

\end{document}

mwe

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .