两栏文章第一页的页脚/页眉

两栏文章第一页的页脚/页眉

如何在类型为\documentclass[conference]{IEEEtran}和/或的两列科学文章的第一页添加页脚和页眉\documentclass{article}

答案1

使用fancyhdr创建firstpage页面样式并应用它 \maketitle使用\thispagestyle{firstpage}

在此处输入图片描述

\documentclass[conference]{IEEEtran}
\usepackage{fancyhdr,lipsum}
\fancypagestyle{firstpage}{% Page style for first page
  \fancyhf{}% Clear header/footer
  \renewcommand{\headrulewidth}{0.4pt}% Header rule
  \renewcommand{\footrulewidth}{0.4pt}% Footer rule
  \fancyhead[C]{My Title --- An Author}% Header
  \fancyfoot[C]{-~\thepage~-}% Footer
}
\pagestyle{plain}% Default page style

\title{My Title}
\author{An Author}
\begin{document}
\maketitle
\thispagestyle{firstpage}% firstpage page style for first page

\lipsum[1-17]

\end{document}

答案2

用洲际弹道导弹击中一只小鸟怎么样? ;)。以下是使用以下内容的答案tikzpagenodes

%\documentclass{article}
\documentclass[conference]{IEEEtran}
\usepackage{tikzpagenodes}
\usepackage{lipsum}

\title{Some title}
\author{Not me}

\begin{document}
\maketitle
  \begin{tikzpicture}[remember picture,overlay]
    \node[align=center,text=red] at ([yshift=1em]current page text area.north) {This is some
            header  text};
    \node[align=center,text=blue] at ([yshift=-1em]current page text area.south) {This is some
            footer text};
  \end{tikzpicture}%

\lipsum[1-14]

\end{document}

在此处输入图片描述

相关内容