I am using the following document class:


I am also using the fancyhdr package to put headers and footers on my pages.


At the moment, the header appears on the left-hand side of every page, whether or not it is odd or even. I want it to be on the outer edge of each page.

If I use 'twoside' in the document class line, then it works. But having 'twoside' screws up other things that I haven't been able to find a fix for, and so I'm trying to find another way around the problem.

Is it possible to not use 'twoside' but have the fancyhdr package still put headers in different places, depending if the page is odd or even?

  • 1
    try \fancyhead[L]{\ifodd\value{page}\else\hfill\fi\leftmark}
    – touhami
    Aug 24 '15 at 14:40
  • This works almost perfectly, thank you. Only issue it, if the header text is so long that it goes onto two lines. Now, the second line always aligns to the left. I need it to alternate left and right. Is that a quick fix? Aug 24 '15 at 18:02

Here is what you need


\chapter{chapter 1 bla bla bla bla bla a bla bla bla blaa bla bla bla bla}
\section{section 1}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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