I am using \fancyhead[EL,OR]to put page number on very left on even pages and on very right on odd pages using fancyhdr but it does not work.

\geometry{paperheight=9.8125in,paperwidth=8in, left=.5in, 
right=.5in,top=.75in,bottom=.4375in }
\fancypagestyle{plain}{\fancyhf{} \fancyhead[EL,OR]{\textbf 
{\baselineskip} \selectfont}
{\baselineskip} \selectfont}
\title{\titlefontarash  Helping each other}
\author{\basefontarash Good boy}
\basefontarash To good...
\basefontarash To those good..
\newgeometry{ left=2.75in, right=.5in }
\fancypagestyle{plain}{ \fancyhf{}\fancyhead[EL,OR]{\textbf 
\section{Introducing the fish}
referring to \citet{Fish(1979)}.
A \textbf{fish}  (or \textbf{cat}) jungle sky.
\newgeometry{ left=.5in, right=.5in}

\bibitem[Fish(1979)]{Fish(1979)} Fish, Y(1979) \textit{orange HHH} New York: 

do u know how to make it work?


When you compile your example, you should notice many warnings like:

Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is useless
on input line 29.

So you can make your example work like what you want by using twoside instead of oneside in your options for the book class. Actually 10pt and twoside are the default for book class, so it is enough to have:

  • David: thanks for your comment but this adds a blank page with a wrong page number after the title. do you know how to get rid of blank page? – Aria May 2 '19 at 21:10
  • @ArashRashidi, this is because \frontmatter includes \cleardoublepage. For a double sided document this is needed, as \frontmatter restarts the page numbering also. And without the extra blank page, you get page i on the left hand side instead of right hand side. This is wrong. However, I'll have a guess at what you'd like and include a full example in my answer. – David Purton May 4 '19 at 8:24
  • @ArashRashidi Actually, you can't do it without a blank page. Your front matter has 3 pages (i–iii). The next page is therefore a left side page which is normally even. But then your main matter suggests page numbering again with one, which needs a right hand page. So either you need a blank page after your title, or a blank page after your contents. Or number everything from 1, rather than using roman numbering at the for your front matter. – David Purton May 4 '19 at 9:17
  • Thanks David for your help. – Aria May 4 '19 at 15:36

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.