Is there a way to write a header with left- and right-aligned text without using the package Fancyhdr?

  • 1
    Sure, you can redefine \@oddhead etc manually. But why don't you want use fancyhdr? Commented Feb 5, 2015 at 12:17
  • 1
    You can use titleps, a companion to the titlesec package.
    – Bernard
    Commented Feb 5, 2015 at 12:35
  • 1
    \makeatletter \newcommand\@oddhead{left\hfill right} is all you need but why not use fancyhdr which does the same, but with a nicer interface? Commented Feb 5, 2015 at 12:51
  • 1
    Package scrlayer-scrpage does a nice job as well. It is part of the KOMA-bundle.
    – Johannes_B
    Commented Feb 5, 2015 at 14:45
  • 1
    There are so many packages that expand the possibilities of the kernel. Invent the wheel every single time? No, that is what packages are for. What would you do without graphicx (and graphics)?
    – Johannes_B
    Commented Feb 5, 2015 at 21:46

1 Answer 1


I defined some macros for easier access to the headers. You have to use the twoside option of the documentclass to actually distinguish between odd and even pages (without all pages are treated as odd).

% Use some ridicolouosly small paper for demonstration


\oddhead{\hfil Some header on odd pages\hfil}
\evenhead{\hfil Some header on even pages\hfil}
\oddfoot{\hfil Some footer on odd pages\hfil}
\evenfoot{\hfil Some footer on even pages\hfil}


Odd page


Even page


enter image description here

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .