0

When using \printindex at the end of the document then the first index page has a centred page number.

But the default for the whole document is right aligned page number.

Then, the second index page has correctly the right aligned page number from the current page.

Could you please help me ?

\documentclass[twoside]{article}

% Packages required by doxygen
\usepackage{calc}
\usepackage{doxygen}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage[table]{xcolor}
%\usepackage{color}

% Font selection
\usepackage[T1]{fontenc}
\usepackage{mathptmx}            % similar to Times New Roman
\usepackage[scaled=.90]{helvet}  % 
\usepackage{courier}             % 
\usepackage{amssymb}
\usepackage{sectsty}
\renewcommand{\familydefault}{\sfdefault}
%
\makeindex
% Page & text layout
\usepackage{geometry}
\geometry{%
  a4paper,%
}
\usepackage[titles]{tocloft} % indent of the "table-of-contents" lines
\tocloftpagestyle{fancy}
% Headers & footers
\usepackage{fancyhdr}  % making  use of the fancy-package     
\pagestyle{fancy}
\usepackage{titletoc}
\usepackage{titlesec}
% page numbering
\fancyfoot[RO, RE]{{\thepage} {/} {\pageref{lastpage}}} 
\begin{document}
\begin{titlepage}
\begin{flushleft}
... generated text 
\addcontentsline{toc}{section}{Index}
\printindex
\end{flushleft}
\label{lastpage}
\end{document}

1 Answer 1

1

I could not get your MWE to run, and in any case it does not demonstrate the issue of relevance as there are no index entries. That said the index package and article class defines pagestyle plain for its first page. Try adding the following line in your code somewhere before the index

\fancypagestyle{plain}

If that doesn't work then post a MWE that illustrates your problem and removes the un-required parts.

0

You must log in to answer this question.

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