独立环境中使用 tabularray 和多页的横向 longtblr

独立环境中使用 tabularray 和多页的横向 longtblr

我正在使用longtblr相对较新的包的环境tabularray来排版一个跨越数页的很长的表格,并且我也正在使用该standalone包在隔离的环境中对其进行修改。

我面临多个问题,不知道如何解决,这就是我请求您帮助的原因。

首先,multi该包的选项standalone导致页边距混乱,因此我无法在不影响页边距的情况下将表格分成多个页面。

其次,我想继续以水平布局编辑表格并仅在主文档(使用该类book)中旋转它,但我不确定它是否可以与像这样的外部导入一起使用\includestandalone{path/to/my/table}


\documentclass[
    varwidth=24.7cm,% 29.7 - 2.5 * 2
    % multi,
]{standalone}

\usepackage{xcolor}

\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}

\begin{document}
\begin{longtblr}[
    caption={Caption.},
]{
    colspec = {
        X[2,l]
        X[1.5,l]
        X[1.8,l]
        X[2,l]
        S[table-format=7]
        S[table-format=6]
        S[table-format=6]
    },
    % COLUMNS
    column{1-9} = {font=\footnotesize},
    % COLUMN SEPARATOR
    colsep = {5pt},
    % ROWS
    rowhead = 1,
    % FIRST ROW
    row{1} = {guard, font=\footnotesize\bfseries, bg=lightgray},
    % HORIZONTAL LINES
    hline{3-Y} = {.5pt, lightgray},
  }
    \toprule
        Title & Name and entity & Leader & Partner & {Total\\amount} & {Lorem\\amount} & {Ipsum\\amount}\\*
    \midrule
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\\pagebreak
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\*
        Lorem ipsum dolor sit amet & consectetur adipiscing elit & Lorem ipsum & Lorem ipsum dolor sit amet, consectetur adipiscing elit & 16000 & 4000 & 6000\\\pagebreak
    \bottomrule
  \end{longtblr}
\end{document}

相关内容