xltabular 超出了页面下边界

xltabular 超出了页面下边界

我设法将问题归结为这个最小的例子。

\documentclass{book}

\usepackage{graphicx}
\usepackage{xltabular}
\usepackage{placeins}

\usepackage[showframe]{geometry}

\begin{document}
    
    \chapter{Everything}

    
        \begin{figure}[h]
        \includegraphics[height=5cm]{example-image-a}
    \end{figure}
    \FloatBarrier
    
    \begin{table}
        \begin{tabular}[h]{|l|l|l|}
            \hline
            test & test & test \\ \hline
            test & test & test \\ \hline
            test & test & test \\ \hline
        \end{tabular}
    \end{table}

\FloatBarrier
        \begin{figure}[h]
        \includegraphics[height=5cm]{example-image-a}
    \end{figure}
    
    \FloatBarrier
    \begin{xltabular}{\textwidth}{ |X|l| }
        
        \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
                test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
                test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
        test & test \\ \hline
    \end{xltabular}
    \FloatBarrier
        \begin{figure}[h]
        \includegraphics[height=7cm]{example-image-a}
    \end{figure}
    
    \FloatBarrier
    \begin{xltabular}{\textwidth}{ |X|l|l|l| }
        
        \hline      
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        test &        test & test &       test \\ \hline
        
        
    \end{xltabular}
\FloatBarrier
    \begin{figure}[h]
    \includegraphics[height=9cm]{example-image-a}
\end{figure}
\FloatBarrier
\end{document}

结果:

在此处输入图片描述

如您所见,最后一个图形部分超出了页面范围。它应该在下一页。我在文档中的多个地方都遇到了这个问题。如果[h]图形上没有使用该选项,一切似乎都很好。

相关内容