长度可变的整页删除线

长度可变的整页删除线

背景:我正在努力重建澳大利亚新西兰自由贸易区首席执行官在 LaTeX 中,它包含一个长度不等的列表。我使用 longtblr 使其跨越多个页面,并使用 fancyfooter 进行底部声明,以便它始终与底部齐平。\textheight 设置得更短,以便 longtblr 提前跳到下一页,避免干扰页脚。(我提供上下文,以防有人能想到比我所想的更好的解决方案)

问题:在最后一页,我需要删除表格的剩余部分,从最后一项的底部到页脚的顶部。由于距离会不断变化,我需要某种 \vfill 和从左上角到右下角的组合删除线。

...
\end{tblr}
% Something here to cross out the rest of the document
\vfill{Strike?}
\end{document}
%footer will appear beneath this 

期望的删除线结果

梅威瑟:

\documentclass[10pt,a4paper]{article}

\usepackage{tabularray}

\setlength{\textheight}{18cm}
\setlength{\textwidth}{18cm}
\setlength{\oddsidemargin}{-1.1cm}
\setlength{\topmargin}{-0.6in}

\DefTblrTemplate{conthead-text,contfoot-text, caption-text,caption-sep,caption-tag}{default}{}

\begin{document}
    \begin{longtblr}{ colspec = {|X|X|}, rowhead = 1, rowfoot = 1} 
    \hline
    Header & Header \\
    \hline
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    \hline
    Footer & Footer \\
    \hline
\end{longtblr}

% STRIKE THROUGH HERE

\end{document}

答案1

您的代码中没有“fancyfooter”。但它或多或少是这样的:

\documentclass[10pt,a4paper]{article}

\usepackage{tabularray}
\UseTblrLibrary{diagbox}

\setlength{\textheight}{18cm}
\setlength{\textwidth}{18cm}
\setlength{\oddsidemargin}{-1.1cm}
\setlength{\topmargin}{-0.6in}

\DefTblrTemplate{conthead-text,contfoot-text, caption-text,caption-sep,caption-tag}{default}{}

\begin{document}

\begin{longtblr}[
   headsep = 0pt, footsep = 0pt, postsep = 0pt,   
]{colspec = {|X|X|}, rowhead = 1, rowfoot = 1} 
    \hline
    Header & Header \\
    \hline
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    item.description & item.cost \\
    \hline
    Footer & Footer \\
    \hline
\end{longtblr}

\noindent
\begin{tblr}{hline{2}, vlines, rowsep=0pt}
\diagbox[width=\textwidth-0.8pt,height=\pagegoal-\pagetotal-0.4pt]{}{}
\end{tblr}

\end{document}

相关内容