使用 fancyhdr 更改一页的页脚边距

使用 fancyhdr 更改一页的页脚边距

我有以下代码,我需要将作者的所属关系放在文档页脚中。但是,文档页脚不够大,无法容纳多个所属关系。我需要与其他几个人共享此模板,因此我需要一个比重置整个论文的页边距更好的答案。我可以使用 Fancyhdr 包为我设置的页脚页面样式执行此操作吗?

\documentclass[12pt,letterpaper,onecolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lipsum}  
\usepackage{placeins} % added to use float barrier
\usepackage{indentfirst} % indent the first paragraph after the section label

\usepackage[left=3.35cm,right=3.96cm,top=1.905cm,bottom=2.36cm]{geometry}



\usepackage{fancyhdr}
\fancypagestyle{specialfooter}{%
  \fancyhf{}
  \renewcommand\headrulewidth{0pt}

  \fancyfoot[L]{$^{1}$ \footnotesize{Department of Civil, Construction, and Environmental Engineering, Iowa State University, Ames, IA, USA}  \\
  $^{2}$  \footnotesize{Co-author affiliations, Earth}}

}



\begin{document}

\begin{titlepage}
    {\noindent Title: {\bf \textit{ The Title for an Excellent Work}} }
    \vspace{1\baselineskip}

    % Authors
    {\noindent Authors: \hspace{4ex} Austin Downey$^{1}$ \\}
    {\indent \hspace{10.5ex} Co-author$^{2}$}
    \vspace{1\baselineskip}


\end{titlepage}

\vspace*{8cm}

\thispagestyle{specialfooter}

\begin{abstract}
\lipsum[1]
\end{abstract}

\section{First section}

\lipsum[1-10]

I do need the large space in the first page.

在这里添加解决方案,因为我不确定链接的页面将活跃多长时间。

 \fancypagestyle{specialfooter}{%
  \fancyhf{}% Clear header/footer
  \renewcommand\headrulewidth{0pt}% Remove header rule
  \fancyfoot[L]{\footnotesize\smash{\begin{tabular}[b]{@{}p{\linewidth}@{}}
   Austin Downey, Dept. of Civil, Construction, and Environmental Eng., Iowa State University, Ames, IA, USA\\
   Co-author, Co-authors affiliation, Earth \\
 \end{tabular}}}
}

答案1

唯一需要关注的是处理更改的页面specialfooter。在该页面上,您可以通过以下方式调整允许的文本块大小\enlargethispage{<len>}(请参阅在当前页面上多挤几行)。 代替扩大具有正 gth 的文本块<len>,我们收缩使用负<len>gth:

在此处输入图片描述

\documentclass{article}

\usepackage{lipsum}  
\usepackage[left=3.35cm,right=3.96cm,top=1.905cm,bottom=2.36cm]{geometry}
\usepackage{fancyhdr}

\fancypagestyle{specialfooter}{%
  \fancyhf{}% Clear header/footer
  \renewcommand\headrulewidth{0pt}% Remove header rule
  \fancyfoot[L]{\footnotesize\begin{tabular}[b]{@{}p{\linewidth}@{}}
    \textsuperscript{1} Department of Civil, Construction, and Environmental Engineering, Iowa State University, Ames, IA, USA \\
    \textsuperscript{2} Co-author affiliations, Earth
  \end{tabular}}
}

\begin{document}

% Not needed in this minimal example, since it's a stand-alone title page
%\begin{titlepage}
  %\noindent
  %\begin{tabular}{@{} l l }
    %Title: & \bfseries\itshape The Title for an Excellent Work \\
    %\\
    %% Authors
    %Authors: & Austin Downey\textsuperscript{1} \\
             %& Co-author\textsuperscript{2}
  %\end{tabular}
%\end{titlepage}

\vspace*{8cm}% Your title

\thispagestyle{specialfooter}% Special footer for this page
\enlargethispage{-2\baselineskip}% Make text block slightly shorter

\begin{abstract}
\lipsum[1]
\end{abstract}

\section{First section}

\lipsum[1-10]

\end{document}

<len>您可以根据作者数量尝试不同的gth。

相关内容