![使用 SetCell 跨行时分页符处的 longtblr 布局出现问题](https://linux22.com/image/474679/%E4%BD%BF%E7%94%A8%20SetCell%20%E8%B7%A8%E8%A1%8C%E6%97%B6%E5%88%86%E9%A1%B5%E7%AC%A6%E5%A4%84%E7%9A%84%20longtblr%20%E5%B8%83%E5%B1%80%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98.png)
我遇到了一个问题,即longtblr
基础表的中间页脚在分页之前覆盖了部分行。
给出以下示例:
\documentclass[letterpaper]{article}
\usepackage[sfdefault]{roboto}
\usepackage{caption}
\usepackage[table,dvipsnames]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tabularray}
\begin{document}
\section{My Section}
\begin{longtblr}[
caption = {My Long Table},
label = {tbl:my-long-table},
]{
colspec = {X[2]X[5]},
width = \linewidth,
rowhead = 1,
rowfoot = 1,
row{even} = {azure9},
row{1,Z} = {c,font=\sffamily\bfseries,bg=azure5,fg=white},
hlines = {azure5,solid,0.4pt},
vlines = {azure5,solid,0.4pt}
}
Column 1 & Column 2 \\
\SetCell[r=2]{c} Row-0 & Row-0 \\
& Row-0 \\
\SetCell[r=2]{c,bg=white} Row-1 & Row-1 \\
& Row-1 \\
\SetCell[r=2]{c} Row-2 & Row-2 \\
& Row-2 \\
\SetCell[r=2]{c,bg=white} Row-3 & Row-3 \\
& Row-3 \\
\SetCell[r=2]{c} Row-4 & Row-4 \\
& Row-4 \\
\SetCell[r=2]{c,bg=white} Row-5 & Row-5 \\
& Row-5 \\
\SetCell[r=2]{c} Row-6 & Row-6 \\
& Row-6 \\
\SetCell[r=2]{c,bg=white} Row-7 & Row-7 \\
& Row-7 \\
\SetCell[r=2]{c} Row-8 & Row-8 \\
& Row-8 \\
\SetCell[r=2]{c,bg=white} Row-9 & Row-9 \\
& Row-9 \\
\SetCell[r=2]{c} Row-10 & Row-10 \\
& Row-10 \\
\SetCell[r=2]{c,bg=white} Row-11 & Row-11 \\
& Row-11 \\
\SetCell[r=2]{c} Row-12 & Row-12 \\
& Row-12 \\
\SetCell[r=2]{c,bg=white} Row-13 & Row-13 \\
& Row-13 \\
\SetCell[r=2]{c} Row-14 & Row-14 \\
& Row-14 \\
\SetCell[r=2]{c,bg=white} Row-15 & Row-15 \\
& Row-15 \\
\SetCell[r=2]{c} Row-16 & Row-16 \\
& Row-16 \\
\SetCell[r=2]{c,bg=white} Row-17 & Row-17 \\
& Row-17 \\
\SetCell[r=2]{c} Row-18 & Row-18 \\
& Row-18 \\
\SetCell[r=2]{c,bg=white} Row-19 & Row-19 \\
& Row-19 \\
\SetCell[r=2]{c} Row-20 & Row-20 \\
& Row-20 \\
\SetCell[r=2]{c,bg=white} Row-21 & Row-21 \\
& Row-21 \\
\SetCell[r=2]{c} Row-22 & Row-22 \\
& Row-22 \\
\SetCell[r=2]{c,bg=white} Row-23 & Row-23 \\
& Row-23 \\
\SetCell[r=2]{c} Row-24 & Row-24 \\
& Row-24 \\
\SetCell[r=2]{c,bg=white} Row-25 & Row-25 \\
& Row-25 \\
\SetCell[r=2]{c} Row-26 & Row-26 \\
& Row-26 \\
\SetCell[r=2]{c,bg=white} Row-27 & Row-27 \\
& Row-27 \\
\SetCell[r=2]{c} Row-28 & Row-28 \\
& Row-28 \\
\SetCell[r=2]{c,bg=white} Row-29 & Row-29 \\
& Row-29 \\
\SetCell[r=2]{c} Row-30 & Row-30 \\
& Row-30 \\
Column 1 & Column 2 \\
\end{longtblr}
\end{document}
我得到以下输出:
中间页脚部分覆盖了第 27 行。我猜这是由于使用了多行命令,因为我在更简单的基础表中没有看到这种行为longtblr
。
有谁知道如何解决这一问题?