0

I have footer in my article file, but the footer does not show in the first page. The Table of Contents is in the first page too, there is a page number in the bottom of the page, but I do not need the page number, so i use below

\tableofcontents 
\thispagestyle{empty}

The number is gone, but the footer is still not there. If I do not use \thispagestyle{empty} the footer still not there

\tableofcontents 

How to have the footer in the first page?(now it shows every page except the first page)

  • 1
    Please add a small minimal working example. At the moment I can't understand your issue. – Marco Daniel Aug 19 '14 at 8:35
  • 1
    With \thispagestyle{empty} you erase the heading and footer for this one page. So it cannot show a footer. If you instead use \pagestyle{...} and insert the pagestyle you used to define your footer it should work. – Gilean0709 Aug 19 '14 at 8:51
1

Since you have not posted a MWE I don't know what package you used to define your footer, so I used \usepackage{fancyhdr} to create one to show you how it works.

\documentclass{article}
\usepackage{fancyhdr}
\fancyhf{}                         % clears the previous formatting of header and foot
\renewcommand{\headrulewidth}{0pt} % erases the rule under the header
\cfoot{my own footer}              % here you can define your footer 

\begin{document}
\pagestyle{fancy}                  
\tableofcontents
\newpage
\section{Section 1}
\newpage
\section{Section 2}
\end{document}

In your first example you used \thispagestyle{empty} to get rid of the number, but this just deleted the whole header and footer. Therefore you have to leave that command out. But you still have to include the command \pagestyle{fancy} so that it actually uses your own footer you defined earlier. Because you said it shows on all the other pages, my guess would be that you used \pagestyle{fancy} on a page after your table of contents.

Because you said "my article file", I assume you mean that your documentclass is article. The solution might be different for other classes, for example report.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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