I am using LaTeX to make a document and I want to hide the header and footer on the page that contains the table of contents.
How can i do this?
I am new to LaTeX, I already searched for an answer but have not found anything useful for me.
This is the code that I use:
\documentclass{report}
\usepackage{textcomp}
\usepackage[hidelinks]{hyperref}
\usepackage{tocloft} % the tocloft package lets you redefine the Table of Contents (ToC)
\renewcommand\cftchappresnum{Chapter } % prefix "Chapter " to chapter number in ToC
\cftsetindents{chapter}{0em}{8em} % set amount of indenting
\cftsetindents{section}{2em}{6em}
% Macros to redefine numbering of appendix sections (and to
% reset numbering when not in per-chapter area appendix)
\newcommand\normalsecnums{%
\renewcommand\thesection{\thechapter.\arabic{section}}}
\let\origchapter\chapter
\renewcommand{\chapter}[1]{\normalsecnums
\origchapter{#1}}
\newcommand\appsecnums{% % execute this command before entering appendix area
\setcounter{section}{0}
\renewcommand\thesection{\appendixname~\Alph{section}}}
\usepackage[lmargin=2cm,rmargin=2.5cm,tmargin=2cm,bmargin=2cm]{geometry}
\usepackage{fancyhdr, lastpage}
\pagestyle{fancy}
\fancyhead[L]{Company name\\ Version 1.0}
\fancyhead[R]{Date: \today\\ Page: \thepage\ of \pageref{LastPage}}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[L]{Company name\ Version 1.0}
\fancyhead[R]{Date: \today\\ Page: \thepage\ of \pageref{LastPage}}
}
\begin{document}
\begin{titlepage}
\begin{center}
\vspace*{\fill}
\Large \textbf{Document Title}
\section*{Author:}
MyName
\vspace*{\fill}
\end{center}
\end{titlepage}
\newpage
\begin{titlepage}
\tableofcontents
\end{titlepage}