1

MWE

\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{fancyhdr}
\usepackage{pifont}
\usepackage{lipsum} % dummy text
\usepackage{ifoddpage}

\checkoddpage 
\ifoddpage
\rfoot{\ding{43} Next Page} %Odd Pages
\else
\rfoot{\ding{43} Side Page} % Even Pages
\fi

\renewcommand{\headrulewidth}{0pt} % to remove the ruler on header

\begin{document}\pagestyle{fancy}

\lipsum[1-30] % dummy text

\rfoot{Check your answers \ding{110}}
\end{document}

It does't work. All pages are writting Next Page. What do I?

Related to: Different texts in various pages in footer

3
  1. You should use twoside in the options:

    \documentclass[a4paper,11pt,twoside]{book}
    
  2. Use the provided mechanism by fancyhdr:

        \fancyfoot[RO]{\ding{43} Next Page} %Odd Pages
        \fancyfoot[LE]{\ding{43} Side Page} % Even Pages
    

Your ifoddpage is executed just once in the preamble, so it is basically run with the page number set to 1 and executes the first \rfoot only.

So your MWE can be changed to:

\documentclass[a4paper,11pt,twoside]{book}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{fancyhdr}
\usepackage{pifont}
\usepackage{lipsum} % dummy text

\fancyfoot[RO]{\ding{43} Next Page} %Odd Pages
\fancyfoot[LE]{\ding{43} Side Page} % Even Pages

\renewcommand{\headrulewidth}{0pt} % to remove the ruler on header

\begin{document}\pagestyle{fancy}

\lipsum[1-30] % dummy text

\rfoot{Check your answers \ding{110}}
\end{document}
  • 1
    twoside is default for book. – Torbjørn T. Jun 13 '15 at 9:36
  • Perfect working, @Rmano. – Özgür Jun 13 '15 at 9:58

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.