Fancyhdr 仅在第一页

Fancyhdr 仅在第一页

我正在写一篇文章,需要在右上角放一个图,但只在第一页。

另外,我需要在左上角放置文章类型

例如

      Scientific Paper (left header).............................Figure (right header)

                              Title of the Article

                            Author 1, Author 2, Author 3

                       Affiliation1, Affiliation2, Affiliation3, 

               Other Abstract                          Abstract
               Some text                               Some text 
               Some text                               Some text 
               Some text                               Some text 
               Some text                               Some text 

我尝试使用“科学论文” fancyhdr,但它只从第二页开始显示。

我迄今为止使用的代码是:

\documentclass[12pt,twoside,titlepage]{ingenius}
\usepackage{blindtext}
\usepackage[spanish]{babel}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{subfig}
\usepackage{marvosym}
\usepackage{authblk}
\usepackage{blindtext}
\usepackage{url}
\usepackage{caption}
\captionsetup{font=small}
\captionsetup[figure]{labelfont=bf}%,textfont=it}
\captionsetup[table]{labelfont=bf}%,textfont=it}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LO]{} 
\fancyhead[RE]{Journal Name}
\fancyhead[LE,RO]{{ \thepage }}
\fancyhead[LO]{{Author 1 / Title of the Article}} 
\renewcommand{\headrulewidth}{0.5pt}
\usepackage{amsmath}
\date{}
\title{ 
{\textsc {Title of the Article}}}

\author[1,*]{Author 1}
\author[2]{Author 2}
\author[1]{Author 3}
\affil[1]{\it Department of Mechanical Engineering}
\affil[2]{\it Department of Electrical Engineering}

\begin{document}
\maketitle
\let\oldthefootnote\thefootnote
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\footnotetext[1]{Autor para correspondencia. Email: 
\url{[email protected]} }
\let\thefootnote\oldthefootnote

\renewcommand{\tablename}{Table}
\renewcommand{\figurename}{Figure}
\renewcommand{\refname}{References}

\vspace{-.7cm}
\noindent 
\begin{center}
{\bf Received:} 18 -- May -- 2012;  \hspace{0.25cm} {\bf Approved:} 20 -- May -- 2012
\end{center}

\begin{multicols}{2}
\noindent {\bf \large  Abstract}
\vspace{0.5cm}
\blindtext
\palabrasclave{keyword 1, keyword 2, etc}
\vfill
\columnbreak

\noindent {\bf \large Other Abstract}
\vspace{0.5cm}
\blindtext
\keywords{keyword 1, keyword 2, etc}
\end{multicols}
\twocolumn
\section{Introduction}
\blindtext
\blindtext
\blindtext
\section{Conclusions}
\blindtext
\blindtext
\blindtext
\section{Conclusions}
\blindtext
\blindtext
\blindtext
\end{document}

要使用的类的代码是

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ingenius}[2011/09/13] 
\LoadClass{article}    
\RequirePackage[latin9]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[english,spanish,es-nolayout]{babel}
%\RequirePackage[font={small},tablename=Tabla,labelfont=
{bf,small},labelsep=period,justification=centerlast]{caption}
\RequirePackage{graphicx}
\RequirePackage{setspace}
\RequirePackage{lmodern}
\RequirePackage[obeyspaces,spaces]{url}
\urlstyle{same}
\RequirePackage[papersize=
{21cm,28cm},twoside,top=2cm,bottom=1.5cm,left=1.2cm,right=1.2cm, 
headheight=1.8cm,headsep=.35cm,footskip=0.85cm]{geometry}


\RequirePackage[colorlinks,linkcolor=black,urlcolor=black,  
citecolor=black,breaklinks=true,%
bookmarks=true,pdfstartview=XYZ]{hyperref}

\newcommand{\keywords}[1]{\vspace{\baselineskip}\parindent 
0pt\textit{\textbf{Keywords}}: #1}
\newcommand{\palabrasclave}[1]{\vspace{\baselineskip}\parindent 
0pt\textbf{\textit{Palabras clave}}: #1}

\newcommand{\tituloingles}[1]%
{\newcommand\@tituloingles{#1}}

感谢您的帮助

答案1

文档类导致标题(使用 创建)在使用 的环境\maketitle中设置。您可以重新定义页面样式:titlepage\thispagestyle{empty}empty

\fancypagestyle{empty}{%
  \fancyhf{}% Clear header/footer
  \fancyhead[L]{Scientific Paper}% Your journal/note
  \fancyhead[R]{\rule{100pt}{30pt}}% Your logo/image
}

在此处输入图片描述

如果这是您的文档中唯一使用该empty页面样式的页面,则以这种方式重新定义它应该不会有问题。否则,您将不得不做更多的工作来创建不同的标题页样式。更令人担忧的是期刊是否接受这一修改后的要求。

相关内容