错过了第一页 cals 表的框架标题的底线吗?

错过了第一页 cals 表的框架标题的底线吗?

如果第一页第一行没有nullcell,那么页眉底行就不会丢失。如果nullcell,那么就会丢失,但只有第一页会丢失,其他页不会丢失。我不明白为什么。抱歉,我的英语不好。

在此处输入图片描述

完整源代码:

\documentclass[12pt]{article}

\usepackage{cals}

\makeatletter

\begin{document}

\begin{calstable}
\colwidths{
{100pt}
{100pt}
}
\thead{
\def\cals@borderT{0.4pt}
\def\cals@borderB{0.4pt}
\def\cals@borderL{0.4pt}
\def\cals@borderR{0.4pt}
\brow
\alignC
\cell{head1}
\cell{head2}
\def\cals@borderT{0pt}
\def\cals@borderB{0pt}
\def\cals@borderL{0pt}
\def\cals@borderR{0pt}
\erow
}
\tfoot{
\hrule width 200pt height 0.4pt depth 0pt\relax
}

%\brow
%\def\cals@borderT{0pt}
%\def\cals@borderB{0pt}
%\def\cals@borderL{0.4pt}
%\def\cals@borderR{0.4pt}
%\cell{1}
%\def\cals@borderL{0pt}
%\def\cals@borderR{0.4pt}
%\cell{text 1}
%\def\cals@borderR{0pt}
%\erow

\brow
\def\cals@borderT{0pt}
\def\cals@borderB{0pt}
\def\cals@borderL{0.4pt}
\def\cals@borderR{0.4pt}
\nullcell{ltr}
\def\cals@borderL{0pt}
\def\cals@borderR{0.4pt}
\cell{text 2}
\def\cals@borderR{0pt}
\erow

\brow
\def\cals@borderT{0pt}
\def\cals@borderB{0pt}
\def\cals@borderL{0.4pt}
\def\cals@borderR{0.4pt}
\nullcell{blr}
\spancontent{2}
\def\cals@borderL{0pt}
\def\cals@borderR{0.4pt}
\cell{text 2}
\def\cals@borderR{0pt}
\erow

\tbreak{\vfill\break}

\brow
\def\cals@borderT{0pt}
\def\cals@borderB{0pt}
\def\cals@borderL{0.4pt}
\def\cals@borderR{0.4pt}
\nullcell{ltr}
\def\cals@borderL{0pt}
\def\cals@borderR{0.4pt}
\cell{text 3}
\def\cals@borderR{0pt}
\erow

\brow
\def\cals@borderT{0pt}
\def\cals@borderB{0pt}
\def\cals@borderL{0.4pt}
\def\cals@borderR{0.4pt}
\nullcell{blr}
\spancontent{3}
\def\cals@borderL{0pt}
\def\cals@borderR{0.4pt}
\cell{text 3}
\def\cals@borderR{0pt}
\erow

\end{calstable}

\end{document}

答案1

我担心这是一个很难定位的错误。相反,我建议重新设计方法并避免使用单元格宽度覆盖。例如:

\documentclass[12pt,a5paper,landscape]{article}

\usepackage[utf8]{inputenc}
\usepackage[a5paper]{geometry}
\geometry{top=10mm, bottom=10mm, left=20mm, right=20mm}
\geometry{includemp=false}
\geometry{includehead=true,includefoot=true}
\geometry{layouthoffset=0mm, layoutvoffset=0mm}
\geometry{headsep=10pt}
\usepackage[T1]{fontenc}
\usepackage{cals}

\makeatletter

\begin{document}

\begin{calstable}
\alignC
\makeatletter
\colwidths{
{100pt}
{100pt}
{100pt}
}

\def\cals@framecs@width{.4pt }
\def\cals@framers@width{.4pt }
\def\cals@cs@width{0pt }
\def\cals@rs@width{0pt }
\def\rUp{\def\cals@borderR{0.4pt}}
\def\rDown{\let\cals@borderR=\relax}

\thead{
\brow
\rUp \cell{head1} \rDown
\nullcell{ltb}
\nullcell{tbr}
\spancontent{head2}
\erow
}

\brow
\rUp \nullcell{ltr} \rDown
\cell{222}
\cell{222}
\erow

\brow
\rUp \nullcell{blr} \rDown
\spancontent{2}
\cell{222}
\cell{222}
\erow

\tbreak{\lastrule\vfill\break}

\brow
\rUp \nullcell{ltr} \rDown
\cell{333}
\cell{333}
\erow

\brow
\rUp \nullcell{lr} \rDown
\cell{333}
\cell{333}
\erow

\brow
\rUp \nullcell{blr} \rDown
\spancontent{3}
\cell{333}
\cell{333}
\erow

\end{calstable}

\end{document}

相关内容