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












0














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}
pagestyle{fancy} renewcommand{headrulewidth}{0pt}

usepackage[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
graphicspath{{C:/Users/header/}}
renewcommand{refname}{References}
begin{document}
lhead{includegraphics[width=1cm]{photo}}

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

I would like to clearpage

123456

bibliographystyle{chicago}
bibliography{C:/Users//Downloads/ref/rref}
end{document}


enter image description hereenter image description here










share|improve this question
























  • Add thispagestyle{fancy} just after maketitle. The reason is that maketitlemodifies the page style.
    – user94293
    2 days ago










  • Thanks. But on the last page, the picture is paired with "reference". Why? Thank you a lot.
    – Carl
    2 days ago










  • Do you want the picture only in the first page?
    – caverac
    2 days ago










  • Right. But I want to solve the problem of pairing photo with reference at first.
    – Carl
    2 days ago










  • @Carl: the problem of paring a photo with reference = a second question. Please create a new question for that.
    – Tom
    2 days ago
















0














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}
pagestyle{fancy} renewcommand{headrulewidth}{0pt}

usepackage[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
graphicspath{{C:/Users/header/}}
renewcommand{refname}{References}
begin{document}
lhead{includegraphics[width=1cm]{photo}}

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

I would like to clearpage

123456

bibliographystyle{chicago}
bibliography{C:/Users//Downloads/ref/rref}
end{document}


enter image description hereenter image description here










share|improve this question
























  • Add thispagestyle{fancy} just after maketitle. The reason is that maketitlemodifies the page style.
    – user94293
    2 days ago










  • Thanks. But on the last page, the picture is paired with "reference". Why? Thank you a lot.
    – Carl
    2 days ago










  • Do you want the picture only in the first page?
    – caverac
    2 days ago










  • Right. But I want to solve the problem of pairing photo with reference at first.
    – Carl
    2 days ago










  • @Carl: the problem of paring a photo with reference = a second question. Please create a new question for that.
    – Tom
    2 days ago














0












0








0


0





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}
pagestyle{fancy} renewcommand{headrulewidth}{0pt}

usepackage[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
graphicspath{{C:/Users/header/}}
renewcommand{refname}{References}
begin{document}
lhead{includegraphics[width=1cm]{photo}}

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

I would like to clearpage

123456

bibliographystyle{chicago}
bibliography{C:/Users//Downloads/ref/rref}
end{document}


enter image description hereenter image description here










share|improve this question















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}
pagestyle{fancy} renewcommand{headrulewidth}{0pt}

usepackage[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
graphicspath{{C:/Users/header/}}
renewcommand{refname}{References}
begin{document}
lhead{includegraphics[width=1cm]{photo}}

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

I would like to clearpage

123456

bibliographystyle{chicago}
bibliography{C:/Users//Downloads/ref/rref}
end{document}


enter image description hereenter image description here







header-footer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago

























asked 2 days ago









Carl

1398




1398












  • Add thispagestyle{fancy} just after maketitle. The reason is that maketitlemodifies the page style.
    – user94293
    2 days ago










  • Thanks. But on the last page, the picture is paired with "reference". Why? Thank you a lot.
    – Carl
    2 days ago










  • Do you want the picture only in the first page?
    – caverac
    2 days ago










  • Right. But I want to solve the problem of pairing photo with reference at first.
    – Carl
    2 days ago










  • @Carl: the problem of paring a photo with reference = a second question. Please create a new question for that.
    – Tom
    2 days ago


















  • Add thispagestyle{fancy} just after maketitle. The reason is that maketitlemodifies the page style.
    – user94293
    2 days ago










  • Thanks. But on the last page, the picture is paired with "reference". Why? Thank you a lot.
    – Carl
    2 days ago










  • Do you want the picture only in the first page?
    – caverac
    2 days ago










  • Right. But I want to solve the problem of pairing photo with reference at first.
    – Carl
    2 days ago










  • @Carl: the problem of paring a photo with reference = a second question. Please create a new question for that.
    – Tom
    2 days ago
















Add thispagestyle{fancy} just after maketitle. The reason is that maketitlemodifies the page style.
– user94293
2 days ago




Add thispagestyle{fancy} just after maketitle. The reason is that maketitlemodifies the page style.
– user94293
2 days ago












Thanks. But on the last page, the picture is paired with "reference". Why? Thank you a lot.
– Carl
2 days ago




Thanks. But on the last page, the picture is paired with "reference". Why? Thank you a lot.
– Carl
2 days ago












Do you want the picture only in the first page?
– caverac
2 days ago




Do you want the picture only in the first page?
– caverac
2 days ago












Right. But I want to solve the problem of pairing photo with reference at first.
– Carl
2 days ago




Right. But I want to solve the problem of pairing photo with reference at first.
– Carl
2 days ago












@Carl: the problem of paring a photo with reference = a second question. Please create a new question for that.
– Tom
2 days ago




@Carl: the problem of paring a photo with reference = a second question. Please create a new question for that.
– Tom
2 days ago










1 Answer
1






active

oldest

votes


















2














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[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
usepackage{lipsum}

%% HEADER %%
pagestyle{fancy}
renewcommand{headrulewidth}{0pt}
renewcommand{bibsection}{}

fancypagestyle{firststyle}
{
fancyhf{}
lhead{includegraphics[width = 2cm]{example-image-a}}
}

% 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}


enter image description here






share|improve this answer























  • 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
    2 days ago












  • @Carl Just some dummy text
    – caverac
    2 days ago










  • 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
    2 days ago










  • @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
    2 days ago










  • I don't. Thank you for your instructions.
    – Carl
    2 days ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f467993%2fhow-to-add-a-picture-into-the-header-in-the-first-page%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














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[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
usepackage{lipsum}

%% HEADER %%
pagestyle{fancy}
renewcommand{headrulewidth}{0pt}
renewcommand{bibsection}{}

fancypagestyle{firststyle}
{
fancyhf{}
lhead{includegraphics[width = 2cm]{example-image-a}}
}

% 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}


enter image description here






share|improve this answer























  • 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
    2 days ago












  • @Carl Just some dummy text
    – caverac
    2 days ago










  • 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
    2 days ago










  • @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
    2 days ago










  • I don't. Thank you for your instructions.
    – Carl
    2 days ago
















2














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[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
usepackage{lipsum}

%% HEADER %%
pagestyle{fancy}
renewcommand{headrulewidth}{0pt}
renewcommand{bibsection}{}

fancypagestyle{firststyle}
{
fancyhf{}
lhead{includegraphics[width = 2cm]{example-image-a}}
}

% 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}


enter image description here






share|improve this answer























  • 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
    2 days ago












  • @Carl Just some dummy text
    – caverac
    2 days ago










  • 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
    2 days ago










  • @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
    2 days ago










  • I don't. Thank you for your instructions.
    – Carl
    2 days ago














2












2








2






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[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
usepackage{lipsum}

%% HEADER %%
pagestyle{fancy}
renewcommand{headrulewidth}{0pt}
renewcommand{bibsection}{}

fancypagestyle{firststyle}
{
fancyhf{}
lhead{includegraphics[width = 2cm]{example-image-a}}
}

% 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}


enter image description here






share|improve this answer














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[top=1in,headsep=4pt,headheight=26pt,bottom=1.in,left=1in,right=1in]{geometry}
usepackage{lipsum}

%% HEADER %%
pagestyle{fancy}
renewcommand{headrulewidth}{0pt}
renewcommand{bibsection}{}

fancypagestyle{firststyle}
{
fancyhf{}
lhead{includegraphics[width = 2cm]{example-image-a}}
}

% 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}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago

























answered 2 days ago









caverac

5,7131624




5,7131624












  • 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
    2 days ago












  • @Carl Just some dummy text
    – caverac
    2 days ago










  • 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
    2 days ago










  • @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
    2 days ago










  • I don't. Thank you for your instructions.
    – Carl
    2 days ago


















  • 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
    2 days ago












  • @Carl Just some dummy text
    – caverac
    2 days ago










  • 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
    2 days ago










  • @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
    2 days ago










  • I don't. Thank you for your instructions.
    – Carl
    2 days ago
















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
2 days ago






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
2 days ago














@Carl Just some dummy text
– caverac
2 days ago




@Carl Just some dummy text
– caverac
2 days ago












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
2 days ago




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
2 days ago












@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
2 days ago




@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
2 days ago












I don't. Thank you for your instructions.
– Carl
2 days ago




I don't. Thank you for your instructions.
– Carl
2 days ago


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f467993%2fhow-to-add-a-picture-into-the-header-in-the-first-page%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae