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.

How to add a page number on the bootom of the first pages in table of contents, list of figures/tables and bibliography?

\tableofcontents
\listoftables
\listoffigures
\bibliography{filename}

Preamble:

\documentclass[12pt,a4paper,oneside]{mwbk}
\usepackage[tableposition=top]{caption}
\usepackage{graphicx}
\usepackage{threeparttable}
\usepackage{polski}
\usepackage{enumitem}
\usepackage{color}
\usepackage[cp1250]{inputenc}
\usepackage{verbatim}
\usepackage{nameref}
\usepackage{natbib}
\usepackage{hyperref}
\usepackage{setspace}
\bibliographystyle{asr}
\bibpunct{[}{]}{;}{a}{}{,}
\fussy
\widowpenalty=10000 
\clubpenalty=10000 
\addtolength{\textwidth}{1,5cm}
\addtolength{\hoffset}{0cm}
\addtolength{\textheight}{0cm}
\addtolength{\voffset}{0cm}

EDIT: additional information added previously is not relevant

share|improve this question
1  
It depends on the documentclass and related packages like scrpage2. Whatever it is the best to provide a minimal example. –  Marco Daniel Dec 16 '11 at 22:09
    
@lockstep: I think page-numbering isn't the correct tag. –  Marco Daniel Dec 16 '11 at 22:12
    
@MarcoDaniel: Let's just say you'd have to remove page-numbering from a lot of questions. ;-) (Perhaps this is a question for meta.) –  lockstep Dec 16 '11 at 22:17
    
Thanks @MarcoDaniel -- I added the content of my preamble. In the sty file (not mine) there are more packages and options, but the list is huge, thus i did not put the whole options at first. I do not know what is relevant. There is no scrpage2 in it, though. –  Karo Dec 16 '11 at 22:18

1 Answer 1

up vote 4 down vote accepted

Add the following to your preamble:

\makeatletter
\let\ps@opening\hf@plain
\makeatother

Note that this will add page numbers at the bottom of every chapter-starting page (including the ToC and the bibliography). Complete example (EDIT: including natbib and a filecontents environment):

\documentclass{mwbk}

\usepackage{natbib}

\makeatletter
\let\ps@opening\hf@plain
\makeatother

\usepackage{filecontents}

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

\usepackage{lipsum}

\begin{document}

\tableofcontents

\chapter{foo}

Some text \citep{A01}.

\lipsum[1-10]

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

(The filecontents environment is only used to include some external files directly into the example, so that it compiles. It is not necessary for the solution.)

share|improve this answer
    
I do want page numbers in all these situations (pages with titles of every kind). But your solution do not work. Is it possible that there is a conflict with some other options of my document? Regular pages have page number at the top of the page, next to the name of a chapter. For chapters I use: \thispagestyle{plain} and it works. –  Karo Dec 16 '11 at 22:41
    
Try to add my code snippet immediately before \begin{document}. It should also make \thispagestyle{plain}for chapter-starting pages superfluous. –  lockstep Dec 16 '11 at 22:46
    
Does not work :/ I will add to the question all packages used in sty file. –  Karo Dec 16 '11 at 22:50
1  
@Karo: Does my complete example work for you? If so, you're doing something different and it is your task to a) reduce your "does not work" example or to b) add things to my example. You also need to sort out your preamble/style file (e.g., don't load hyperref twice). –  lockstep Dec 16 '11 at 23:01
1  
I've revised my example. Note that it still works if I copy and paste your whole preamble except \bibiographystyle{asr}. –  lockstep Dec 16 '11 at 23:41

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.