使用 longtable 时,我的页面边界存在问题。longtable 下方的文本总是超出页面底部限制。该示例由一份大型报告组成,这种情况多次发生。我使用 longtable 环境,因为内容是自动生成的,并且可以扩展到多个页面。此外,图形位置应保持在页面顶部,新部分应从图形之后开始,这就是我无法更改 [ht] 或删除 \FloatBarrier 的原因。
我认为 LaTeX 无法正确计算所需空间。有人知道这个问题的解决方案吗?
谢谢您的帮助!
谨致问候,Jann
问题图片:
我的代码:
\documentclass[a4paper,twoside,10pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{longtable}
\usepackage{graphicx}
\usepackage{placeins}
\usepackage{caption}
\begin{document}
Text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
\begin{figure}[ht]%
\center
\includegraphics{Test.pdf}%
\caption{Test}
\end{figure}
\FloatBarrier
\section{TEXT}
\begin{small}
\begin{longtable}{|T{0.34\textwidth}|T{0.1\textwidth}|T{0.35\textwidth}|T{0.1\textwidth}|}
\hline
\textbf{Name} & \textbf{Number} & \textbf{Text} & \textbf{Unit} \\ \hline
\endfirsthead
\multicolumn{4}{c}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline
\textbf{Name} & \textbf{Number} & \textbf{Text} & \textbf{Unit} \\ \hline
\endhead
\hline
\multicolumn{4}{r}{{Continued on next page $\longrightarrow$}} \\
\endfoot
\endlastfoot
\texttt{Text} & \texttt{Text} & Text & $\text{s}$ \tabularnewline
\texttt{Text} & \texttt{Text} & Text & $\text{s}$ \tabularnewline
\texttt{Text} & \texttt{Text} & Text & $\text{s}$ \tabularnewline
\hline \hiderowcolors \caption{Text Text}
\end{longtable}
\end{small}
Text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
Text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
Text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
\end{document}