fancyhdr 和 cals 垂直合并问题

fancyhdr 和 cals 垂直合并问题
\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}

答案1

一个解决方法:让另一个表由非cals包排版。我附上了一个使用基本tabular环境的示例和这两个页面的预览。这样,不同的维度/定义就不会相互干扰。

\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}

姆韦

相关内容