# How to add a picture into the header in the first page?

how can I add a picture into the header in the first page of my article? Thank you very much in advance.

My sample code can only create a file with the picture showing up on the second page.

\documentclass[12pt,a4paper]{article}
\usepackage{grffile,graphicx,hyperref,graphbox} \usepackage{fancyhdr}
\usepackage[sort]{natbib} \usepackage[svgnames]{xcolor}

\renewcommand{\refname}{References}
\begin{document}

{\centering \title{Stat} \author{Yan}
\maketitle}

I would like to \clearpage

123456

\bibliographystyle{chicago}
\end{document}


• Add \thispagestyle{fancy} just after \maketitle. The reason is that \maketitlemodifies the page style. – user94293 Dec 31 '18 at 8:23
• Thanks. But on the last page, the picture is paired with "reference". Why? Thank you a lot. – Carl Dec 31 '18 at 8:32
• Do you want the picture only in the first page? – caverac Dec 31 '18 at 8:35
• Right. But I want to solve the problem of pairing photo with reference at first. – Carl Dec 31 '18 at 8:37
• @Carl: the problem of paring a photo with reference = a second question. Please create a new question for that. – Tommiie Dec 31 '18 at 11:46

I took the liberty of cleaning your code a bit

\documentclass[12pt,a4paper]{article}

\usepackage{grffile,graphicx,hyperref,graphbox}
\usepackage{fancyhdr}
\usepackage[sort]{natbib}
\usepackage[svgnames]{xcolor}
\usepackage{lipsum}

\pagestyle{fancy}
\renewcommand{\bibsection}{}

\fancypagestyle{firststyle}
{
\fancyhf{}
}

% AUTHOR INFO
\title{Stat}
\author{Yan}

%% DOCUMENT
\begin{document}
\maketitle
\thispagestyle{firststyle}

\section{One section}
\lipsum[1-2]\clearpage

\section{Other section}
\lipsum[3-5]\cite{White1983}

\bibliographystyle{plain}
\section*{References}
\bibliography{refs}
\end{document}


• Thank you a lot. Could you tell me what does the "\lipsum[1-2]" and "\lipsum[3-5]" mean or function here? It returned me with the error that "Package kantlipsum Error: Package expl3 too old. }" after I ran your code. Thanks. – Carl Dec 31 '18 at 9:28
• @Carl Just some dummy text – caverac Dec 31 '18 at 9:31
• And if you add up the command, "\bibliography{C:/Users/ref/rref}, which a bib.tex file, my previous problem wasn't solved. Thank you. – Carl Dec 31 '18 at 9:35
• @Carl Do you want References to appear on the header? or you don't? It appears there because the header is configured to include the current section title. – caverac Dec 31 '18 at 9:41
• I don't. Thank you for your instructions. – Carl Dec 31 '18 at 9:43