如何设置起始页长表格的最小行数?

如何设置起始页长表格的最小行数?

有一张长桌

%!TEX TS-program = xelatex

\documentclass[14pt, a4paper]{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX},Renderer=Basic}
\setmainfont[Ligatures={TeX,Historic}]{Times New Roman}
\usepackage{indentfirst}
\frenchspacing

%%% Tables.
\usepackage{array, booktabs, longtable}
\usepackage{makecell, multirow}
%
\usepackage{siunitx}

% Caption of Table
\usepackage[format=hang,
labelsep = space,
skip=1ex, 
singlelinecheck=false]{caption}

%%% Page
\usepackage{extsizes}
\usepackage{geometry}
\geometry{top=20mm, bottom=20mm, left=20mm, right=15mm}

\begin{document}
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. Lorem Ipsum is simply dummy text of the printing and typesetting industry. 

    \begingroup
    \sisetup{table-column-width=6.5ex}
    \begin{longtable}[l]{@{}c  
            S[table-column-width=11ex,
            table-format= 4.1]
            S[table-format=-3.1]
            S[table-format=-3.1]
            S[table-format= 1.4]
            S[table-format= 1.2]
            S[table-format=-2.1]
            S[table-format=-2.1]
            @{}}
        \caption{--- Caption of long table}
        \label{tableLabel} \\
        \toprule
        \multirow{3}{*}{Date}
        &   {\multirow{3}{*}[1ex]{\makecell{Ratio V/N\\ transactions$^*$\\ EURO}}}
        &   \multicolumn{2}{c}{\makecell{Absolute increases, \\ EURO}}
        &   \multicolumn{2}{c}{Coefficients}
        &   \multicolumn{2}{c}{\makecell{Rates of\\ growth \%}} \\
        \cmidrule(lr){3-4}
        \cmidrule(lr){5-6}
        \cmidrule(lr){7-8}
        &   &   {chain}
        &   {base}
        &   {chain}
        &   {base}
        &   {chain}
        &   {base}                                  \\
        \midrule
        {1} & {2} & {3} & {4} & {5} & {6} & {7} & {8}                           \\
        \midrule
        \endfirsthead
        %
        \multicolumn{8}{r}{Table continuation \ref{tableLabel}}                     \\
        \midrule
        \multirow{3}{*}{Date}
        &   {\multirow{3}{*}[1ex]{\makecell{Ratio V/N\\ transactions$^*$\\ EURO}}}
        &   \multicolumn{2}{c}{\makecell{Absolute \\ increases}}
        &   \multicolumn{2}{c}{Coefficients}
        &   \multicolumn{2}{c}{\makecell{Rates of\\ growth \%}} \\
        \cmidrule(lr){3-4}
        \cmidrule(lr){5-6}
        \cmidrule(lr){7-8}
        &   &   {chain}
        &   {base}
        &   {chain}
        &   {base}
        &   {chain}
        &   {base}                                  \\
        \midrule
        {1} & {2} & {3} & {4} & {5} & {6} & {7} & {8}                           \\
        \midrule
        \endhead
        \midrule
        \multicolumn{5}{@{}l}{\footnotesize
            $^*$: Ratio of the volume of, transactions to the number of transactions in EURO}
        &   \multicolumn{3}{r}{\footnotesize Continuation on the next page}
        \endfoot
        \bottomrule
        \multicolumn{8}{@{}l}{\footnotesize
            $^*$: Ratio of the volume of, transactions to the number of transactions in EURO}
        \endlastfoot
        %
        30.09.2014  & 1438  & {--} & {--} & {--} & 1 & {--} & {--} \\
        01.10.2014  & 1358,6&-79,4&-79,4&0,945&0,94&-5,5&-5,5 \\
        02.10.2014&796,3&-562,3&-641,7&0,586&0,55&-41,4&-44,6 \\
        03.10.2014&685,5&-110,8&-752,5&0,861&0,48&-13,9&-52,3 \\
        06.10.2014&574,8&-110,7&-863,2&0,839&0,4&-16,1&-60 \\
        \addlinespace
        07.10.2014&620,7&45,9&-817,3&1,08&0,43&8&-56,8 \\
        08.10.2014&696,9&76,2&-741,1&1,123&0,48&12,3&-51,5 \\
        09.10.2014&647,1&-49,8&-790,9&0,929&0,45&-7,1&-55 \\
        10.10.2014&734,6&87,5&-703,4&1,135&0,51&13,5&-48,9 \\
        13.10.2014&764,8&30,2&-673,2&1,041&0,53&4,1&-46,8 \\
        \addlinespace
        01.10.2014&1358,6&-79,4&-79,4&0,945&0,94&-5,5&-5,5 \\
        02.10.2014&796,3&-562,3&-641,7&0,586&0,55&-41,4&-44,6 \\
        03.10.2014&685,5&-110,8&-752,5&0,861&0,48&-13,9&-52,3 \\
        06.10.2014&574,8&-110,7&-863,2&0,839&0,4&-16,1&-60 \\
        07.10.2014&620,7&45,9&-817,3&1,08&0,43&8&-56,8 \\
        \addlinespace
        08.10.2014&696,9&76,2&-741,1&1,123&0,48&12,3&-51,5 \\
        09.10.2014&647,1&-49,8&-790,9&0,929&0,45&-7,1&-55 \\
        10.10.2014&734,6&87,5&-703,4&1,135&0,51&13,5&-48,9 \\
        13.10.2014&764,8&30,2&-673,2&1,041&0,53&4,1&-46,8 \\
        01.10.2014&1358,6&-79,4&-79,4&0,945&0,94&-5,5&-5,5 \\
        \addlinespace
        02.10.2014&796,3&-562,3&-641,7&0,586&0,55&-41,4&-44,6 \\
        03.10.2014&685,5&-110,8&-752,5&0,861&0,48&-13,9&-52,3 \\
        06.10.2014&574,8&-110,7&-863,2&0,839&0,4&-16,1&-60 \\
        07.10.2014&620,7&45,9&-817,3&1,08&0,43&8&-56,8 \\
        08.10.2014&696,9&76,2&-741,1&1,123&0,48&12,3&-51,5 \\
        \addlinespace
        09.10.2014&647,1&-49,8&-790,9&0,929&0,45&-7,1&-55 \\
        10.10.2014&734,6&87,5&-703,4&1,135&0,51&13,5&-48,9 \\
        13.10.2014&764,8&30,2&-673,2&1,041&0,53&4,1&-46,8 \\
        01.10.2014&1358,6&-79,4&-79,4&0,945&0,94&-5,5&-5,5 \\
        02.10.2014&796,3&-562,3&-641,7&0,586&0,55&-41,4&-44,6 \\
        \addlinespace
        03.10.2014&685,5&-110,8&-752,5&0,861&0,48&-13,9&-52,3 \\
        06.10.2014&574,8&-110,7&-863,2&0,839&0,4&-16,1&-60 \\
        07.10.2014&620,7&45,9&-817,3&1,08&0,43&8&-56,8 \\
        08.10.2014&696,9&76,2&-741,1&1,123&0,48&12,3&-51,5 \\
        09.10.2014&647,1&-49,8&-790,9&0,929&0,45&-7,1&-55 \\
        \addlinespace
        10.10.2014&734,6&87,5&-703,4&1,135&0,51&13,5&-48,9 \\
        13.10.2014&764,8&30,2&-673,2&1,041&0,53&4,1&-46,8 \\
        01.10.2014&1358,6&-79,4&-79,4&0,945&0,94&-5,5&-5,5 \\
        02.10.2014&796,3&-562,3&-641,7&0,586&0,55&-41,4&-44,6 \\
        03.10.2014&685,5&-110,8&-752,5&0,861&0,48&-13,9&-52,3 \\
        \addlinespace
    \end{longtable}
    \endgroup
\end{document}

当表格移动到新页面时,上一页只能保留一行数据。您可以在图片中看到它。

在此处输入图片描述 在此处输入图片描述

我需要在上一页留下至少3行或更多行的数据,否则表格应该完全转移到新的页面。

答案1

要强制 LaTeX 将长表的特定部分保持在一起,必须使用\\*而不是 ,\\这确实禁止在这些行之间分页。如果您对前三行执行此操作,它应该可以解决您的问题。

请注意:过度使用此“功能”会导致 longtable 中断,这可能是您不想要的。

相关内容