I'm trying to numerate pages depending on even and odd and add chapter name the left part of the header and section name to the right.
here's the code,
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RE]{\leftmark}
\fancyhead[LO]{\rightmark}
\fancyfoot[RO,LE]{\thepage}
the output gives me only the chapter name in the left no matter if it is an odd or even page umber, and the numbering in the footer is always in the right.
Best Answer
Use the
twoside
option for your document class: for example, forreport
:Otherwise, the distinction between
E
andO
has no effect.In a comment it has been requested to have the same position for the page number for the first pages of a chapter; this can be achieved redefining the
plain
style (by default this style is applied to the first page of a chapter). The following example illustrates this: