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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know I can do


But I want my custom class that I am making (based on article) to do this for me. It already does pagestyle{fancy}, but I can't get it to change the first page.

I tried (adding this to myclass.cls)


but that didn't work.

I also tried redefining \maketitle and adding it at the end:

    \vskip 2em%
    \let \footnote \thanks
        {\LARGE \@title \par}%
        \vskip 1.5em%
            \lineskip .5em%
        \vskip 1em%
        {\large \@date}%
    \vskip 1.5em%
    \thispagestyle{fancy} %%%%%%%%%%%%% HERE

but that didn't work either.

share|improve this question
I've added what I tried with \maketitle in the post. I copied the code from tex.stackexchange.com/a/844/8289, and found that it did not change the appearance so it must be right (but of course the line I added in didn't change anything either, when it should have). – Mk12 Jun 27 '12 at 22:36
up vote 4 down vote accepted

It wouldn't matter adding \thispagestyle{fancy} at the end of \@maketitle, since \maketitle issues \thispagestyle{plain} after calling \@maketitle, overriding any styles you set within \@maketitle.

Add the following to your class, after loading fancyhdr and the definition of \maketitle (or loading article, if you're not defining \maketitle yourself):


This appends \thispagestyle{fancy} after \maketitle. And, since article doesn't issue a page break after \maketitle, you should still be on the same page, making the above additional valid.

share|improve this answer
Thank you :). And thanks for the explanation as well. I was wondering if there was a way to add to macros like that, I'm sure I'll find this useful in other places too. – Mk12 Jun 27 '12 at 22:38

Your Answer


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.