Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The publishing house I am going to publish a book with demands no page number on the first page of each chapter. I used \thispagestyle{empty} in most cases and had to use \renewcommand{\bibsetup}{\thispagestyle{empty}} for no number on the first page of the bibliography. But I could not find a solution for no page number on the first page of the Indexes. Is there anything like \bibsetup which works for the Indexes? You will see below that I tried already with \addtocontents{toc}{\protect\thispagestyle{empty}}, but it did not work.

Here is an excerpt of my file:

\documentclass[14pt,twoside]{book} 
\usepackage{imakeidx}
\usepackage{fancyhdr, blindtext}
\begin{document}
%then the text

\cleardoublepage
\addcontentsline{toc}{chapter}{Bibliography}
\renewcommand{\bibsetup}{\thispagestyle{empty}}
\printbibliography
%this command works nicely

\thispagestyle{empty}
\addcontentsline{toc}{chapter}{Index}
 \addtocontents{toc}{\protect\thispagestyle{empty}}
    \thispagestyle{empty}
\printindex
\end{document}
share|improve this question
    
See also tex.stackexchange.com/a/103589/5001 for an answer that suppresses the page number automatically on the first page of the Index as well as the first page of every chapter. –  Mico Mar 27 '13 at 10:12

2 Answers 2

up vote 3 down vote accepted

As you're using fancyhdr, you may simply use \fancypagestyle to redefine the plain pagestyle (which is used for chapter-starting pages) so that it resembles the empty style. This works for "normal" chapters, for a bibligraphy created with biblatex, and for the index.

\documentclass{book} 

\usepackage{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\usepackage{fancyhdr}
\pagestyle{fancy}

\fancypagestyle{plain}{%
  \fancyhf{}%
  \renewcommand*{\headrulewidth}{0pt}%
}

\usepackage{imakeidx}
\makeindex

\begin{document}

\chapter{foo}

Some text \autocite{A01}\index{Alpha}.

\printbibliography

\printindex

\end{document}
share|improve this answer
    
thank you very much! –  elisa freschi Mar 27 '13 at 10:18

Good morning, the cause of the problem, so to speak, is the definition of the theindex environment from the class file, e.g. article.cls, book.cls etc., which is used in the ind file. We include this file by calling the \printindex command. The problem is that it contains \thispagestyle{empty} and it overwrites our external efforts.

My approach is to overwrite/wrap it before it gets chance to overwrite us. Please use one line at a time from lines 2-4 to get some common situations.

\let\originalstyle=\thispagestyle            % Store the command for later reuse.
%\def\thispagestyle#1{\fancyfoot[C]{}}       % This clears footer in the center if fancyhdr is in use.
%\def\thispagestyle#1{\originalstyle{empty}} % Use this to get blank header+footer, TeXnically it is only \thispagestyle{empty}.
\def\thispagestyle#1{}                       % This line completely ignores the content of the \thispagestyle command.
\printindex                                  % Typeset the actual Index.
\let\thispagestyle=\originalstyle            % Let's get back to the original version of the \thispagestyle, if needed later in the document.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.