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 set the right footer of the ToC to empty?

I've tried this way, but it hasn't resolve the issue :

\documentclass[12pt,english]{report}
\usepackage{fancyhdr}
\pagestyle{fancy}
\makeatletter
\def\@makeschapterhead#1{%
  \vspace*{10\p@}%
  {\parindent \z@
    {\raggedleft \reset@font
    \scshape \vphantom{\@chapapp{} \thechapter}
    \par\nobreak}%
  \par\nobreak
  \vspace*{30\p@}
  \interlinepenalty\@M
  \usefont{OT1}{ptm}{b}{n}
  {\raggedright \Huge #1}%
  \par\nobreak
  \par\nobreak
  \vskip 45\p@
}}
\makeatother

\rfoot{\thepage}
\begin{document}
\thispagestyle{empty}\tableofcontents{}
\thispagestyle{empty}\listoffigures
\thispagestyle{empty}\listoftables
\end{document}

Any brilliant idea, please?

share|improve this question
2  
At least one problem with the current setup is that you're using @ in document commands without setting the appropriate catcodes. See What do \makeatletter and \makeatother do? –  Werner May 3 at 16:26
    
\pagenumbering{gobble}\tableofcontents \listoffigures ... \pagenumbering{arabic} ... would help? I'm not 100% sure what exactly you're after. –  tohecz May 3 at 16:26
    
@Werner, I've updated my post. –  dgs May 3 at 16:31
    
@tohecz, that have only deleted the first page of toc's pagenumbering and haven't unset the right foot pagenumber of the others. –  dgs May 3 at 16:36
2  
@musicman, the OP want to remove the page number from the table of contents page, not the page numbers shown on it. –  Sigur May 3 at 16:40

2 Answers 2

up vote 4 down vote accepted

The problem is that you need to \pagestyle{empty} for the ToCs, and as well to suppress the effect of \thispagestyle of the command \chapter* called by them:

\documentclass[12pt,english]{report}
\usepackage{fancyhdr}
\makeatletter
\def\@makeschapterhead#1{%
  \vspace*{10\p@}%
  {\parindent \z@
    {\raggedleft \reset@font
    \scshape \vphantom{\@chapapp{} \thechapter}
    \par\nobreak}%
  \par\nobreak
  \vspace*{30\p@}
  \interlinepenalty\@M
  \usefont{OT1}{ptm}{b}{n}
  {\raggedright \Huge #1}%
  \par\nobreak
  \par\nobreak
  \vskip 45\p@
}}
\makeatother
\fancyfoot{}
\fancyfoot[R]{\thepage}
\begin{document}

\pagestyle{empty}
\begingroup % make the following \let local
\makeatletter
\let\thispagestyle\@gobble % suppress \thispagestyle
\makeatother
\tableofcontents
\listoffigures
\listoftables
\endgroup
\clearpage % to make the following \pagestyle effective at the right page
\pagestyle{fancy}

\chapter{First chapter}
Dummy text.

\end{document}
share|improve this answer

If you load the tocloft package, you could issue the command

\tocloftpagestyle{empty}

to suppress the display of page numbers in the table of contents, list of figures, and list of tables.

You can load the tocloft package with the option titles to leave the form of the headers of the ToC, the LoF, and the LoT unaffected:

\usepackage[titles]{tocloft}
\tocloftpagestyle{empty}
share|improve this answer
    
sorry but that will change my toc's customized style and it hasn't solved my issue. –  dgs May 3 at 16:49
    
I'm sorry (I was talking about the font style and size.) –  dgs May 3 at 16:52
    
@dgs Load the package like this: \usepackage[titles]{tocloft}. –  Gonzalo Medina May 3 at 16:55
    
@GonzaloMedina - Thanks. I've added this information in the body of my answer. –  Mico May 3 at 16:58
    
I'm quite unhappy about this answer not getting accepted. –  tohecz May 3 at 17:16

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.