Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

For various reasons, I need to put my name and title in the header of a LaTeX document. The reason is I have a page limit and need the extra space which is taken up by \maketitle. Does anyone know how to do this? For reference, I am using the standard amsart document class.

What I have tried so far is to use the package fancyhdr and then writing

\pagestyle{fancy}
\headheight=14pt

\fancyhf{}

\lhead{name}
\rhead{title}

in the preamble, but I cannot get the header to appear on the first page (the desired header appears on subsequent pages). Does anyone have any suggestions?

share|improve this question
1  
Welcome to TeX.SE. –  Peter Grill Nov 6 '12 at 1:37

1 Answer 1

up vote 3 down vote accepted

Including \thispagestyle{fancy} adds the title to the first page:

enter image description here

Notes:

  • The lipsum package was used just to provide dummy text. It is not needed in your document.

Code:

\documentclass{amsart}
\usepackage{fancyhdr}
\usepackage{lipsum}

\pagestyle{fancy}
\headheight=14pt

\fancyhf{}

\lhead{name}
\rhead{title}
\thispagestyle{fancy}

\begin{document}
\lipsum[1-10]
\end{document}
share|improve this answer
    
Thank you very much, this worked! May I ask what the purpose of \thispagestyle{fancy} is? –  student555 Nov 6 '12 at 1:48
    
That'll teach me not to guess at solutions!! :-) I don't know for sure, but would guess (opps, here I go again) that the page style is set to plain initially so that the header/footer does not show up on the title page (which is normally the desired behavior). –  Peter Grill Nov 6 '12 at 1:59
    
Thank you. But I found my page numbers are correspondingly missed! –  Kurt Oct 3 at 3:14
    
@Comeseeconquer: I am not sure if you are asking a question. If so, please post a new question. If this solution worked for you then you should give feedback clicking the 'up' arrow you can see above each answer's score. –  Peter Grill Oct 3 at 18:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.