Also I want that footer of the contents contain page number centered and the code affect pages of the contents only(the header on the rest pages of the book must exist).
I have read the following two websites, but it doesn't work.
http://www.latex-community.org/forum/vi ... f=5&t=2161
http://www.latex-community.org/forum/vi ... f=4&t=3436
Many thanks!
Code: Select all
\documentclass[openany]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[ER]{\leftmark}
\fancyhead[OL]{\rightmark}
\fancyhead[EL,OR]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
.........
Code: Select all
\documentclass[openany]{book}
\usepackage[pagestyles]{titlesec}
\usepackage{titletoc}
\sethead[][][][]{{}{}{}}
.............