我的文档的所有页面都有一个默认页眉。而延伸到新页面的长表页眉与默认页眉重叠。有没有办法让延伸的长表留出足够的垂直空间以避免与默认页眉重叠?
谢谢!Reshmi
答案1
类似这样的事?
\documentclass{article}
\usepackage{longtable}
\usepackage{fancyhdr}
\usepackage{lipsum} % for dummy text, remove this line in your actual document
% Set up the default page header
\pagestyle{fancy}
\fancyhf{}
\lhead{Default Page Header}
\rhead{\thepage}
% Adjust the vertical space for longtable headers
\setlength{\LTpre}{10pt} % adjust the space before longtable headers
\setlength{\LTpost}{10pt} % adjust the space after longtable headers
\begin{document}
% Your document content goes here
\lipsum[1-3] % dummy text, replace this with your actual longtable
% Example of longtable usage
\begin{longtable}{ll}
\hline
\textbf{Column 1} & \textbf{Column 2} \\
\hline
\endhead
\hline
\endfoot
Data 1 & Data 2 \\
Data 3 & Data 4 \\
Data 1 & Data 2 \\
% ... more rows
\hline
\caption{Example Longtable}
\end{longtable}
% Continue with the rest of your document
\end{document}