删除图表和长表后的页脚上方的文本

删除图表和长表后的页脚上方的文本

除此之外,该文档完全符合我的要求。文本在除一页之外的每一页上都符合页脚。在这一页上,第一个是图形,然后是一个长表(实际上并没有跨页,但过去是这样的),然后是一个 \subsubsection 命令和一个 \paragraph 命令,然后是文本和另一个长表,然后是文本,然后是一个方程式。

小节标题出现在页脚正上方。段落标题(我不得不降低段落级别以匹配我项目中标准 Word 模板的格式,因此放弃段落标题是行不通的)和后续句子位于页脚上方,下表及其后续文本都消失了 - 它们不再是文档的一部分,尽管其标题显示在页面的最底部。如果图表不是页面上的第一项,则页脚会受到尊重,文本会正确地跨页面流动。

我在下面附加了一个最小示例,但这种情况只发生在页面顶部有图片的情况下,因此图片很长。图片占位符的大小将文本置于表格下方,我发现问题就出在这里。


\documentclass[10pt]{article}
\RequirePackage{array}
\RequirePackage{fancyhdr}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage[includeheadfoot,hmarginratio=1:1]{geometry}                
\geometry{letterpaper}                   

\newcolumntype{L}[1]{>{\raggedright}m{#1}}
\newcolumntype{C}[1]{>{\centering}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft}m{#1}}
\newcommand\T{\rule{0pt}{2.6ex}}           % Top strut
\newcommand\B{\rule[-1.2ex]{0pt}{0pt}}  % Bottom strut

\setcounter{secnumdepth}{6}

\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent

\begin{document}
    \newcommand{\docNumber}{LETTERS-HERE}
    \newcommand{\docRevision}{0}

\clearpage
    \pagestyle{fancy}
    \fancyheadoffset{0cm}
    \rhead{}
    \chead{\fontsize{10pt}{10pt}\selectfont \bfseries{\docNumber\ Rev.\docRevision}}
    \lhead{}
    \rfoot{}
    \cfoot{\fontsize{10pt}{10pt}\selectfont \thepage \\ \small{Footer content goes here.  Lots and lots of footer content.  In really tiny type.  Really.  Lots of footer content.  Because I have to, not because I want to.}}
    \rfoot{}

    \newgeometry{includeheadfoot,margin=1in}
    \pagenumbering{roman}

%%%%%%
% Start main matter and adjust page numbering
%%%%%%
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}

\section{section intro}
\label{sec:intro}
Curabitur ullamcorper ullamcorper vehicula. Nam condimentum placerat orci at hendrerit. Nullam gravida purus risus, at aliquet erat condimentum eu. Morbi semper libero in neque dignissim, vitae imperdiet enim suscipit. Morbi euismod sed massa quis lacinia. Sed augue sem, pretium id nunc eu, consectetur sagittis dui. Nullam ac semper ligula, in ullamcorper lectus. Etiam ultrices finibus leo, id viverra libero egestas sed. Suspendisse rhoncus dapibus dolor, pharetra pretium velit gravida non. Nulla id sodales justo. Vivamus ornare, mi eget vehicula congue, turpis metus congue odio, vel sollicitudin tellus justo eget turpis. Nam laoreet risus non tortor vestibulum efficitur. Fusce sed ex eros. Morbi eleifend, odio et pharetra tincidunt, tortor risus eleifend massa, eu pulvinar leo velit id risus. Nam in congue eros. Curabitur non lorem posuere, porttitor nulla a, interdum quam.

Maecenas tempor leo quis felis viverra vestibulum. Phasellus semper nibh magna, id placerat velit aliquam quis. Curabitur sodales sit amet nulla in condimentum. Aliquam in commodo dui. Sed vitae suscipit mauris. Integer fermentum commodo mi, a malesuada nisi feugiat vel. Vivamus porta, mauris ac consequat porta, turpis nunc pellentesque risus, vel commodo metus arcu viverra enim.

Maecenas nisi diam, fermentum et lacinia non, sollicitudin ut orci. Phasellus nibh sem, pretium vel felis vel, commodo lacinia sapien. Etiam vehicula nulla consectetur sagittis lobortis. Morbi posuere arcu ut quam eleifend, at malesuada metus iaculis. Praesent in sollicitudin augue. Cras ac eros volutpat, varius tellus id, suscipit mauris. Nam venenatis consectetur metus vel accumsan.

Donec ut lobortis mauris. Aenean nec ante dui. Sed eu pulvinar leo. Nullam ornare, magna nec sollicitudin hendrerit, diam neque gravida elit, pulvinar interdum odio lacus at lectus. Integer felis neque, convallis vitae dignissim in, auctor eget ante. Pellentesque varius consectetur libero mollis aliquet. Nullam ullamcorper, purus vitae pellentesque dapibus, justo neque facilisis massa, a gravida orci quam vitae arcu. Pellentesque elit est, viverra iaculis tortor at, dapibus porta sapien. Etiam varius nunc nisi, quis consequat felis semper non.

Aliquam pretium feugiat ligula, sed congue risus iaculis et. Donec posuere quam gravida lectus cursus egestas. Suspendisse vestibulum egestas ornare. Nunc venenatis nisi sit amet ipsum bibendum euismod. Aliquam scelerisque est ac tortor consectetur porttitor. Etiam venenatis pharetra eros at luctus. Quisque eu nulla vel leo interdum porttitor. Donec sit amet facilisis ex. Vivamus sit amet augue ipsum. Aenean dui mi, ultricies eget dolor at, facilisis fermentum ex. Cras sed sem vel erat dignissim tincidunt semper vel dolor. Proin non pulvinar mi.

Curabitur ullamcorper ullamcorper vehicula. Nam condimentum placerat orci at hendrerit. Nullam gravida purus risus, at aliquet erat condimentum eu. Morbi semper libero in neque dignissim, vitae imperdiet enim suscipit. Morbi euismod sed massa quis lacinia. Sed augue sem, pretium id nunc eu, consectetur sagittis dui. Nullam ac semper ligula, in ullamcorper lectus. Etiam ultrices finibus leo, id viverra libero egestas sed. Suspendisse rhoncus dapibus dolor, pharetra pretium velit gravida non. Nulla id sodales justo. Vivamus ornare, mi eget vehicula congue, turpis metus congue odio, vel sollicitudin tellus justo eget turpis. Nam laoreet risus non tortor vestibulum efficitur. Fusce sed ex eros. Morbi eleifend, odio et pharetra tincidunt, tortor risus eleifend massa, eu pulvinar leo velit id risus. Nam in congue eros. Curabitur non lorem posuere, porttitor nulla a, interdum quam.

Maecenas tempor leo quis felis viverra vestibulum. Phasellus semper nibh magna, id placerat velit aliquam quis. Curabitur sodales sit amet nulla in condimentum. Aliquam in commodo dui. Sed vitae suscipit mauris. Integer fermentum commodo mi, a malesuada nisi feugiat vel. Vivamus porta, mauris ac consequat porta, turpis nunc pellentesque risus, vel commodo metus arcu viverra enim.

\begin{figure}[h]
\centering
\includegraphics[width=6in, viewport=10 50 720 500, clip=true]{NoFileHere.png}
\caption[Caption of Figure Placeholder]{Detailed description of non-existent figure goes here.}
\label{fig:noFileHere}
\end{figure}

\setlength\extrarowheight{0pt}
\renewcommand{\arraystretch}{1.5}
\begin{center}
\begin{longtable}{|>{\centering $}m{1.25in}<{$}|>{\sffamily}p{5in}<{\rmfamily}|}
\caption{Mathematical notation} 
\label{tab:mathNotation1} \\
\hline \endfirsthead
\caption[]{\emph{continued}}\\
\hline \endhead
\hline
\multicolumn{2}{r}{\emph{continued on next page}}
\endfoot
\hline \endlastfoot
\hline
\tilde{\mathbf{v}}=\mathbf{q}_{i,b}-\mathbf{d}_{e,i} \B \T & Tilde (~$\tilde{ }$~):  difference between q and d values (uses $e,i-1$ for subscript $i-1$ and $e,i$ for subscript $i$) \\
\hline
 $ \begin{displaymath} \dot{\mathbf{v}}=\frac{\delta\mathbf{v}}{\delta t} \end{displaymath} $  & Dot (~$\dot{ }$~):  partial derivative with respect to time \\
\hline
\delta \mathbf{x} = \mathbf{x}_i - \mathbf{x}_{i-1} \B \T &  Delta ($\delta$):  difference between current and past values \\
\hline
\delta t \B \T &  Elapsed time \\
\hline
\delta t \B \T &  Elapsed time \\
\hline
\delta t \B \T &  Elapsed time \\
\hline
\theta_i \B \T & Sensed thingummies at time $i$ \\
\hline
\end{longtable}
\end{center}

%%%%%%%
%% section two comment - weirdness begins here
%%%%%%%%
\subsubsection{SSSection Heading Two}
\label{subsubsec:headingtwo}

\paragraph{Where the problem is}

Mauris augue ipsum, posuere nec consectetur et, finibus eget libero. Proin interdum elit vel risus egestas tincidunt. Aliquam dapibus, arcu a elementum pharetra, ex sem venenatis nisi, in sagittis tellus nibh sed augue. 

\begin{center}
\begin{longtable}{ >{\centering $}m{1.25in}<{$} >{\sffamily}p{5in}<{\rmfamily}}
\caption{Mathematical notation } 
\label{tab:mathNotation} \\
\endfirsthead
\caption[]{\emph{continued}}\\
 \endhead
\multicolumn{2}{r}{\emph{continued on next page}}
\endfoot
 \endlastfoot
\theta \B \T & $\theta$~is the vector of random stuff related to the other stuff\\
\tilde{\theta}_{i-1} \B \T & is the vector of the old weird other stuff minus the new not weird stuff \\
\theta_r \B \T & is the random (input) stuff differences \\
\theta_c \B \T & is the new vector of weird stuff\\
\mathrm{f}_s  \B \T & is the vector of not at all weird, really bibs and bobs (the weird murmel sensed) \\
\mathrm{f}_d  \B \T & is the vector of colored whosiwhatsises (the input whosiwhatsises)
\end{longtable}
\end{center}

Praesent diam neque, luctus et tincidunt non, vulputate auctor neque. Duis massa metus, elementum sit amet est non, eleifend facilisis ipsum. Donec fermentum vel orci ac tincidunt. Nullam id ipsum eget ligula tincidunt tempor eget vitae massa. Nam aliquam scelerisque ipsum, sed pulvinar urna accumsan quis.

\begin{equation}
\ddot{\tilde{\theta_i}}=\mathrm{M}^{-1}_i \left( J^T \left( \theta_i \right) \left( \mathrm{f}_s - \mathrm{f}_d \right) - \mathrm{K}_{pj}\tilde{\theta}_{i-1} - \mathrm{K}_{dj}\dot{\tilde{\theta}}_{i-1} \right)
\end{equation}

Aliquam pretium feugiat ligula, sed congue risus iaculis et. Donec posuere quam gravida lectus cursus egestas. Suspendisse vestibulum egestas ornare. Nunc venenatis nisi sit amet ipsum bibendum euismod. Aliquam scelerisque est ac tortor consectetur porttitor. Etiam venenatis pharetra eros at luctus. Quisque eu nulla vel leo interdum porttitor. Donec sit amet facilisis ex. Vivamus sit amet augue ipsum. Aenean dui mi, ultricies eget dolor at, facilisis fermentum ex. Cras sed sem vel erat dignissim tincidunt semper vel dolor. Proin non pulvinar mi.

\end{document}

答案1

\clearpage您可以在章节标题前使用,让乳胶回到正轨。

请注意,longtable永远不应在center环境中,它不会影响长表的对齐,因为它们始终是全宽的,它只会增加虚假的垂直空间)。 我还将其更改为[h]永远不应单独使用。[ht][h]

\documentclass[10pt]{article}
\RequirePackage{array}
\RequirePackage{fancyhdr}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage[includeheadfoot,hmarginratio=1:1]{geometry}                
\geometry{letterpaper}                   

\newcolumntype{L}[1]{>{\raggedright}m{#1}}
\newcolumntype{C}[1]{>{\centering}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft}m{#1}}
\newcommand\T{\rule{0pt}{2.6ex}}           % Top strut
\newcommand\B{\rule[-1.2ex]{0pt}{0pt}}  % Bottom strut

\setcounter{secnumdepth}{6}

\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent

\begin{document}
    \newcommand{\docNumber}{LETTERS-HERE}
    \newcommand{\docRevision}{0}

\clearpage
    \pagestyle{fancy}
    \fancyheadoffset{0cm}
    \rhead{}
    \chead{\fontsize{10pt}{10pt}\selectfont \bfseries{\docNumber\ Rev.\docRevision}}
    \lhead{}
    \rfoot{}
    \cfoot{\fontsize{10pt}{10pt}\selectfont \thepage \\ \small{Footer content goes here.  Lots and lots of footer content.  In really tiny type.  Really.  Lots of footer content.  Because I have to, not because I want to.}}
    \rfoot{}

    \newgeometry{includeheadfoot,margin=1in}
    \pagenumbering{roman}

%%%%%%
% Start main matter and adjust page numbering
%%%%%%
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}

\section{section intro}
\label{sec:intro}
Curabitur ullamcorper ullamcorper vehicula. Nam condimentum placerat orci at hendrerit. Nullam gravida purus risus, at aliquet erat condimentum eu. Morbi semper libero in neque dignissim, vitae imperdiet enim suscipit. Morbi euismod sed massa quis lacinia. Sed augue sem, pretium id nunc eu, consectetur sagittis dui. Nullam ac semper ligula, in ullamcorper lectus. Etiam ultrices finibus leo, id viverra libero egestas sed. Suspendisse rhoncus dapibus dolor, pharetra pretium velit gravida non. Nulla id sodales justo. Vivamus ornare, mi eget vehicula congue, turpis metus congue odio, vel sollicitudin tellus justo eget turpis. Nam laoreet risus non tortor vestibulum efficitur. Fusce sed ex eros. Morbi eleifend, odio et pharetra tincidunt, tortor risus eleifend massa, eu pulvinar leo velit id risus. Nam in congue eros. Curabitur non lorem posuere, porttitor nulla a, interdum quam.

Maecenas tempor leo quis felis viverra vestibulum. Phasellus semper nibh magna, id placerat velit aliquam quis. Curabitur sodales sit amet nulla in condimentum. Aliquam in commodo dui. Sed vitae suscipit mauris. Integer fermentum commodo mi, a malesuada nisi feugiat vel. Vivamus porta, mauris ac consequat porta, turpis nunc pellentesque risus, vel commodo metus arcu viverra enim.

Maecenas nisi diam, fermentum et lacinia non, sollicitudin ut orci. Phasellus nibh sem, pretium vel felis vel, commodo lacinia sapien. Etiam vehicula nulla consectetur sagittis lobortis. Morbi posuere arcu ut quam eleifend, at malesuada metus iaculis. Praesent in sollicitudin augue. Cras ac eros volutpat, varius tellus id, suscipit mauris. Nam venenatis consectetur metus vel accumsan.

Donec ut lobortis mauris. Aenean nec ante dui. Sed eu pulvinar leo. Nullam ornare, magna nec sollicitudin hendrerit, diam neque gravida elit, pulvinar interdum odio lacus at lectus. Integer felis neque, convallis vitae dignissim in, auctor eget ante. Pellentesque varius consectetur libero mollis aliquet. Nullam ullamcorper, purus vitae pellentesque dapibus, justo neque facilisis massa, a gravida orci quam vitae arcu. Pellentesque elit est, viverra iaculis tortor at, dapibus porta sapien. Etiam varius nunc nisi, quis consequat felis semper non.

Aliquam pretium feugiat ligula, sed congue risus iaculis et. Donec posuere quam gravida lectus cursus egestas. Suspendisse vestibulum egestas ornare. Nunc venenatis nisi sit amet ipsum bibendum euismod. Aliquam scelerisque est ac tortor consectetur porttitor. Etiam venenatis pharetra eros at luctus. Quisque eu nulla vel leo interdum porttitor. Donec sit amet facilisis ex. Vivamus sit amet augue ipsum. Aenean dui mi, ultricies eget dolor at, facilisis fermentum ex. Cras sed sem vel erat dignissim tincidunt semper vel dolor. Proin non pulvinar mi.

Curabitur ullamcorper ullamcorper vehicula. Nam condimentum placerat orci at hendrerit. Nullam gravida purus risus, at aliquet erat condimentum eu. Morbi semper libero in neque dignissim, vitae imperdiet enim suscipit. Morbi euismod sed massa quis lacinia. Sed augue sem, pretium id nunc eu, consectetur sagittis dui. Nullam ac semper ligula, in ullamcorper lectus. Etiam ultrices finibus leo, id viverra libero egestas sed. Suspendisse rhoncus dapibus dolor, pharetra pretium velit gravida non. Nulla id sodales justo. Vivamus ornare, mi eget vehicula congue, turpis metus congue odio, vel sollicitudin tellus justo eget turpis. Nam laoreet risus non tortor vestibulum efficitur. Fusce sed ex eros. Morbi eleifend, odio et pharetra tincidunt, tortor risus eleifend massa, eu pulvinar leo velit id risus. Nam in congue eros. Curabitur non lorem posuere, porttitor nulla a, interdum quam.

Maecenas tempor leo quis felis viverra vestibulum. Phasellus semper nibh magna, id placerat velit aliquam quis. Curabitur sodales sit amet nulla in condimentum. Aliquam in commodo dui. Sed vitae suscipit mauris. Integer fermentum commodo mi, a malesuada nisi feugiat vel. Vivamus porta, mauris ac consequat porta, turpis nunc pellentesque risus, vel commodo metus arcu viverra enim.

\begin{figure}[ht]
\centering
\includegraphics[width=6in, viewport=10 50 720 500, clip=true]{NoFileHere.png}
\caption[Caption of Figure Placeholder]{Detailed description of non-existent figure goes here.}
\label{fig:noFileHere}
\end{figure}

\setlength\extrarowheight{0pt}
\renewcommand{\arraystretch}{1.5}
\begin{center}
\begin{longtable}{|>{\centering $}m{1.25in}<{$}|>{\sffamily}p{5in}<{\rmfamily}|}
\caption{Mathematical notation} 
\label{tab:mathNotation1} \\
\hline \endfirsthead
\caption[]{\emph{continued}}\\
\hline \endhead
\hline
\multicolumn{2}{r}{\emph{continued on next page}}
\endfoot
\hline \endlastfoot
\hline
\tilde{\mathbf{v}}=\mathbf{q}_{i,b}-\mathbf{d}_{e,i} \B \T & Tilde (~$\tilde{ }$~):  difference between q and d values (uses $e,i-1$ for subscript $i-1$ and $e,i$ for subscript $i$) \\
\hline
 $ \begin{displaymath} \dot{\mathbf{v}}=\frac{\delta\mathbf{v}}{\delta t} \end{displaymath} $  & Dot (~$\dot{ }$~):  partial derivative with respect to time \\
\hline
\delta \mathbf{x} = \mathbf{x}_i - \mathbf{x}_{i-1} \B \T &  Delta ($\delta$):  difference between current and past values \\
\hline
\delta t \B \T &  Elapsed time \\
\hline
\delta t \B \T &  Elapsed time \\
\hline
\delta t \B \T &  Elapsed time \\
\hline
\theta_i \B \T & Sensed thingummies at time $i$ \\
\hline
\end{longtable}
\end{center}

%%%%%%%
%% section two comment - weirdness begins here
%%%%%%%%
\clearpage

\subsubsection{SSSection Heading Two}
\label{subsubsec:headingtwo}

\paragraph{Where the problem is}

Mauris augue ipsum, posuere nec consectetur et, finibus eget libero. Proin interdum elit vel risus egestas tincidunt. Aliquam dapibus, arcu a elementum pharetra, ex sem venenatis nisi, in sagittis tellus nibh sed augue. 


\begin{longtable}{ >{\centering $}m{1.25in}<{$} >{\sffamily}p{5in}<{\rmfamily}}
\caption{Mathematical notation } 
\label{tab:mathNotation} \\
\endfirsthead
\caption[]{\emph{continued}}\\
 \endhead
\multicolumn{2}{r}{\emph{continued on next page}}
\endfoot
 \endlastfoot
\theta \B \T & $\theta$~is the vector of random stuff related to the other stuff\\
\tilde{\theta}_{i-1} \B \T & is the vector of the old weird other stuff minus the new not weird stuff \\
\theta_r \B \T & is the random (input) stuff differences \\
\theta_c \B \T & is the new vector of weird stuff\\
\mathrm{f}_s  \B \T & is the vector of not at all weird, really bibs and bobs (the weird murmel sensed) \\
\mathrm{f}_d  \B \T & is the vector of colored whosiwhatsises (the input whosiwhatsises)
\end{longtable}


Praesent diam neque, luctus et tincidunt non, vulputate auctor neque. Duis massa metus, elementum sit amet est non, eleifend facilisis ipsum. Donec fermentum vel orci ac tincidunt. Nullam id ipsum eget ligula tincidunt tempor eget vitae massa. Nam aliquam scelerisque ipsum, sed pulvinar urna accumsan quis.

\begin{equation}
\ddot{\tilde{\theta_i}}=\mathrm{M}^{-1}_i \left( J^T \left( \theta_i \right) \left( \mathrm{f}_s - \mathrm{f}_d \right) - \mathrm{K}_{pj}\tilde{\theta}_{i-1} - \mathrm{K}_{dj}\dot{\tilde{\theta}}_{i-1} \right)
\end{equation}

Aliquam pretium feugiat ligula, sed congue risus iaculis et. Donec posuere quam gravida lectus cursus egestas. Suspendisse vestibulum egestas ornare. Nunc venenatis nisi sit amet ipsum bibendum euismod. Aliquam scelerisque est ac tortor consectetur porttitor. Etiam venenatis pharetra eros at luctus. Quisque eu nulla vel leo interdum porttitor. Donec sit amet facilisis ex. Vivamus sit amet augue ipsum. Aenean dui mi, ultricies eget dolor at, facilisis fermentum ex. Cras sed sem vel erat dignissim tincidunt semper vel dolor. Proin non pulvinar mi.

\end{document}

答案2

部分但非永久的解决方案:

如果表格没有跨页,那么当 longtable 环境包含在一个浮动表格中时

\begin{table}[h!] \begin{center} \begin{longtable} ... \end{longtable} \end{center} \end{table}

问题就解决了。但是,表格不会跨页显示,因此如果随后需要将其延续到下一页,则需要手动删除 \begin{table} 和 \end{table} 语句。

相关内容