0

I'm writing a report in which I want to have separate numbering styles before and after the introduction. For the executive summary and toc I want to have no page numbering, and following this (up to the introduction) I want to have lowercase roman numeral numbering in the bottom right corner, for example just 'iv'. For the introduction onwards I want arabic numbering in the style 'Page X of X' in the bottom right corner.

enter image description here

I've got the correct styling for the latter sections, however the method I've used to do this also applies this style to the front matter (e.g. 'Page ii of 2').

enter image description here

I'm unsure how to redefine the \rfoot style after a particular section or how to overwrite the numbering format on particular pages, but retain the fancy page styling.

Below is a MWE of my report.

\documentclass[a4paper,draft, 12pt]{report}

\usepackage[top=2cm,left=2cm,right=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}
\fancyhf{}

\rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}

\makeatletter
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{fancy}
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\makeatother

\begin{document}

\chapter*{Executive Summary}
\thispagestyle{empty}

Some text

\tableofcontents
\thispagestyle{empty}

\chapter*{Glossary}
\pagenumbering{roman}

\chapter*{List of abbreviations}

\listoffigures

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\pagenumbering{arabic}

Some text

\chapter{First Chapter}

Some text

\end{document}

2 Answers 2

1

The best way is to define different page styles for the different parts. For the Executive summary you can use \pagestyle{empty} as you apparently don't want any headers or footers there. For the two other parts I defined two page styles frontmatter and mainmatter, that contains the footer definitions. I also put the \pagenumbering command there to keep everything together.

Please note that usually it is important to give a \newpage, \clearpage or \cleardoublepage (whatever is appropriate) before the \pagestyle command, otherwise the previous page might be affected.

If you want to add headers, it is best to do that inside the \fancypagestyle commands too.

And, by the way, I generally advise against the use of the old-fashioned commands like \rfoot. It is usually better to use \fancyfoot etc, especially if you want to differentiate between even and odd pages.

\documentclass[a4paper,draft, 12pt]{report}

\usepackage[top=2cm,left=2cm,right=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}
\fancyhf{}
\fancypagestyle{frontmatter}{
  \pagenumbering{roman}
  \rfoot{\thepage}
}
\fancypagestyle{mainmatter}{
  \pagenumbering{arabic}
  \rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}
}

\makeatletter
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{fancy}
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\makeatother

\begin{document}
\pagestyle{empty}
\chapter*{Executive Summary}
\thispagestyle{empty}

Some text

\clearpage
\pagestyle{frontmatter}
\tableofcontents
\thispagestyle{empty}

\chapter*{Glossary}

\chapter*{List of abbreviations}

\listoffigures

\clearpage
\pagestyle{mainmatter}
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}


Some text

\chapter{First Chapter}

Some text

\end{document}
1

You need to apply three different styles: empty (already defined), to frontmatter (roman numbering) and to mainmatter (Page X of X). The last two have to be defined.

When you apply \pagestyle{<style>}, it will be effective from that place forward (after a clearpage).

The redefinition of the chapter command takes care of the necessary clearpage for \chapter and \chapter*; and also of the style of the first page of a chapter. Otherwise it will be in style plain (arabic page number in the center of the footer)

I added \renewcommand{\headrulewidth}{0pt} to suppress the header rule. If you want to add a footer rule add \renewcommand{\footrulewidth}{0.5pt} in the preamble.

Glossary will have the number i in the footer while Introduction will have Page 1 of 2.

\documentclass[a4paper,draft, 12pt]{report}

\usepackage[top=2cm,left=2cm,right=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}   

\makeatletter
\renewcommand\chapter{%
    \if@openright\cleardoublepage\else\clearpage\fi% a
%   \thispagestyle{fancy} % not needed <<<<<
    \global\@topnum\z@%
    \@afterindentfalse%
    \secdef\@chapter\@schapter}
\makeatother

\fancypagestyle{frontmatter}{% 
    \fancyhf{}% clear previous definitions
    \pagenumbering{roman}
    \fancyfoot[R]{\thepage}
}

\fancypagestyle{mainmatter}{%
    \fancyhf{}% clear previous definitions
    \pagenumbering{arabic}
    \fancyfoot[R]{Page \thepage\ of \pageref{LastPage}}
}

\renewcommand{\headrulewidth}{0pt}% no upper rule <<<<<
%\renewcommand{\footrulewidth}{0.5pt}% optional foot rule <<<<<

\begin{document}
    \pagestyle{empty} % starts style empty <<<<<<<<<<
    
    \chapter*{Executive Summary}
        
    Some text
    
    \tableofcontents
    
    \chapter*{Glossary}
    \pagestyle{frontmatter} % starts style frontmatter <<<<<<<<<<<<<
    
    \chapter*{List of abbreviations}
    
    \listoffigures

    \chapter*{Introduction} 
    \addcontentsline{toc}{chapter}{Introduction}
    \pagestyle{mainmatter} % starts style mainmatter <<<<<<<<<<<
    
    Some text
    
    \chapter{First Chapter}
    Some text   
        
\end{document}

You must log in to answer this question.

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