On first page of Table of Contents there is no header and footer, but on the second page there are a header and a footer.
My question: I don't need any numbering and header/footer on table of content. How can I have the entire table of contents (not only its first page) appear with no header or footer, and have them start at Chapter 1?
\documentclass[tikz,table,twoside,12pt,a4paper]{report}
\usepackage{PTSansNarrow}
\usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
\usepackage{xcolor}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage[ruled, vlined, linesnumbered]{algorithm2e}
\usepackage{censor}
\censorruledepth=-.2ex
\censorruleheight=.1ex
\usepackage{setspace}
\usepackage{subfigure}
\usepackage{subfig}
\usepackage[top=3.5cm, bottom=3.5cm, left=3.5cm, right=2.75cm]{geometry}
\usepackage{fancyhdr}
\usepackage{url}
\usepackage{fancyvrb}
\usepackage{color}
\textwidth14cm
\definecolor{darkblue}{rgb}{0.1,0.3,0.5}
\DefineVerbatimEnvironment%
{MyVerbatim}{Verbatim}
{gobble=0,label=\hspace{.85\textwidth},labelposition=all}
\usepackage[Lenny]{fncychap}%Sonny, Lenny, Glenn, Conny, Rejne, Bjornstrup and Bjarne
\usepackage{cite}
\usepackage{rotfloat}
\usepackage{subfloat}
\usepackage[titletoc]{appendix}
% load package with ``framed'' and ``numbered'' option.
\usepackage[numbered,autolinebreaks,useliterate]{mcode}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{}
\fancyhead[R]{\nouppercase{\leftmark}}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}
\begin{document}
\pagenumbering{gobble}% Remove page numbers (and reset to 1)
\clearpage
\title{\textbf{THESIS NAME}\\
\begin{figure}[ht]
\centering
\includegraphics[width=0.5\textwidth]{logo.eps}
\end{figure}
}
\date{}
\author{\textbf{SUBMITTED BY:}\\\textbf{STUDENT NAME}
\vspace{5mm}
\\
\textbf{Supervised By}\\
\textbf{NAME}\quad
\vspace{10mm}
\\
\textbf{DEPARTMENT OF COMPUTER SCIENCE} \\\textbf{NAME OF UNIVERSITY} \\\textbf{Session:2012-2013} }
\maketitle
\null
\vfill
\null
\vfill
\onehalfspacing
\newpage
\pagenumbering{roman}
\chapter* {PROJECT APPROVAL}
SAKASLJFSAJFKSAJFJEIJ S\KJ\\\\
\newline
COMMITTEE\\\\
\newline
\begin{flushleft}
External Examiner: \line(1,0){250}
\end{flushleft}
\begin{flushleft}
Comments: \line(1,0){250}
\end{flushleft}
\begin{flushleft}
Internal Examiner: \line(1,0){250}
\end{flushleft}
\begin{flushleft}
Comments: \line(1,0){250}
\end{flushleft}
\begin{flushleft}
Chairman: \line(1,0){250}
\end{flushleft}
\begin{flushleft}
Comments: \line(1,0){250}
\end{flushleft}
\chapter* {DEDICATION}
KSAHDSAFH ASK JFASKJF
\chapter* {ABSTRACT}
XCLSCSAJFSAFOSAFISADKFLASKFL;ASKSAKFLKSALKFS
\chapter* {ACKNOWLEDGEMENT}
LSAFLDSFJ SDAFJIASFAS JFSJAF SFSFAUI DSAF
\chapter* {AUTHOR'S DECLARATION}
ABC
\newline
Signature of Authors\\
\newline
ABC: \xblackout{forty two}\\
\newline
ABC: \xblackout{forty two}\\
\newline
Date: \xblackout{forty two}\\
\newpage
\pagenumbering{gobble}% Remove page numbers (and reset to 1)
\clearpage
\tableofcontents
\pagenumbering{arabic}
\input{ch1}
\input{ch2}
\input{ch3}
\input{ch4}
\input{ch5}
\input{ch6}
\input{ch7}
\input{ch8}
\addcontentsline{toc}{section}{\textbf{Bibliography}}
\bibliographystyle{plain}
\bibliography{bibk}
\end{document}
Best Answer
I do not know whether this output is intended, but I
\relaxed
basically the\thispagestyle{}
command within a\renewcommand{\tableofcontents}
, so that actually headers etc. are applied.Edit: The first version of this question was quite unclear or even contradicting, so I used this answer, but I will not update it.
The important lines are
The
renewcommand{\thispagestyle}
to do nothing must begrouped
, so that it is effective only there and works as expected when other calls to that command occur.Note I had to comment some lines to make the example compile!
Edit Solution without header and footer for TOC If
\pagestyle{fancy}
is active while\tablecontents
is to be shipped out, there is no wonder that this will hold for the second and following pages of the TOC too. So shift the\pagestyle
to a place afterwards, apply a\clearpage
before.