Page LayoutRemove Page Numbers from LoF and LoT

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
buster
Posts: 19
Joined: Thu Mar 04, 2010 5:49 pm

Remove Page Numbers from LoF and LoT

Post by buster »

I have a Table of Contents, followed by List of Figures and List of Tables. I want to remove the dots and page numbering on the right from the LoF and LoT pages. I used the tocloft package to remove dots using

Code: Select all

\renewcommand{\cftdotsep}{\cftnodots}
placed in between the

Code: Select all

\tableofcontents
and

Code: Select all

\listoffigures
\listoftables
so i tried to use

Code: Select all

\cftpagenumbersoff{Chapter}
\cftpagenumbersoff{Section}
\cftpagenumbersoff{Subsection}
in the same place. It doesn't work, and I don't really understand the package guide as to why not and I couldn't find anything when searching here.

preamble includes

Code: Select all

\documentclass[11pt,a4paper,english]{report}
\usepackage{chapterbib}
(if it makes any difference)

any help very much appreciated. gotta catch a plane in 12 hours and will do a mwe when back if no solution.

edit: tried \pagenumbering{gobble} inserted at various locations but couldn't get that to work either
Last edited by buster on Wed Aug 31, 2011 10:47 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Remove Page Numbers from LoF and LoT

Post by Frits »

Have a look at this post. Does that do the trick for you?
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove Page Numbers from LoF and LoT

Post by localghost »

buster wrote:[…] It doesn't work, and I don't really understand the package guide as to why not and I couldn't find anything when searching here. […]
I don't see where the tocloft manual is unclear in this regard.

Code: Select all

\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{tocloft}
\usepackage{blindtext}

\renewcommand{\cftdotsep}{\cftnodots}
\cftpagenumbersoff{chapter}
\cftpagenumbersoff{section}
\cftpagenumbersoff{subsection}
\cftpagenumbersoff{subsubsection}

\begin{document}
  \tableofcontents
  
  \blinddocument
\end{document}
The entries for the \cftpagenumbersoff command are of course case-sensitive.


Thorsten
buster
Posts: 19
Joined: Thu Mar 04, 2010 5:49 pm

Remove Page Numbers from LoF and LoT

Post by buster »

thanks for tips.
the other post refers to table of contents - i don't want to change the toc.
tried it anyway and there was no change.

thanks for the case sensitive, i missed that completely.
changed it but it still doesn't work exactly as i wish.


this works to remove dots and page numbers in all 3 lists

Code: Select all

 % *************** Table of contents ***************
\pagestyle{headings}
\renewcommand\contentsname{Table of Contents}
\cftpagenumbersoff{chapter}
\cftpagenumbersoff{section}
\cftpagenumbersoff{subsection}
\cftpagenumbersoff{subsubsection}
\tableofcontents

 % **************** List of Tables, Illustrations etc *****************

\renewcommand{\cftdotsep}{\cftnodots}

\cftpagenumbersoff{chapter}
\cftpagenumbersoff{section}
\cftpagenumbersoff{subsection}
\cftpagenumbersoff{subsubsection}

\clearpage \newpage
\listoffigures
\clearpage \newpage
\listoftables
this next one removes all dots, and page numbers only for the toc

Code: Select all

 % *************** Table of contents ***************
\pagestyle{headings}
\renewcommand\contentsname{Table of Contents}
\cftpagenumbersoff{chapter}
\cftpagenumbersoff{section}
\cftpagenumbersoff{subsection}
\cftpagenumbersoff{subsubsection}
\tableofcontents

 % **************** List of Tables, Illustrations etc *****************

\renewcommand{\cftdotsep}{\cftnodots}

\clearpage \newpage
\listoffigures
\clearpage \newpage
\listoftables
this final one removes dots only for the list of figures and list of tables (which i want), but doesn't remove numbers anywhere!

Code: Select all

 % *************** Table of contents ***************
\pagestyle{headings}
\renewcommand\contentsname{Table of Contents}
\tableofcontents

 % **************** List of Tables, Illustrations etc *****************

\renewcommand{\cftdotsep}{\cftnodots}
\cftpagenumbersoff{chapter}
\cftpagenumbersoff{section}
\cftpagenumbersoff{subsection}
\cftpagenumbersoff{subsubsection}
\clearpage \newpage
\listoffigures
\clearpage \newpage
\listoftables
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove Page Numbers from LoF and LoT

Post by localghost »

I don't know where I had my head. Would have been better for me to think first and then post. Perhaps I was little bit misled by you trying to turn off the page numbers for some heading levels and the corresponding entries in the ToC.

The below example should do what you are after. Page numbers for LoF and LoT can be turned off in the preamble. The dotted line has to be turned off later in order not to affect the ToC.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[tableposition=top]{caption}
\usepackage{tocloft}

\cftpagenumbersoff{figure}
\cftpagenumbersoff{table}

\begin{document}
  \tableofcontents

  \renewcommand{\cftdotsep}{\cftnodots}
  \listoffigures 
  \listoftables

  \section{Foo}
  \subsection{Bar}
  \begin{figure}[!ht]
    \centering
    \rule{6.4cm}{3.6cm}
    \caption{Dummy figure}\label{fig:dummy}
  \end{figure}

  \begin{table}[!ht]
    \caption{Dummy table}\label{tab:dummy}
    \centering
    \rule{6.4cm}{3.6cm}
  \end{table}
\end{document}
For further details refer to the (quite clear) package manual.
buster
Posts: 19
Joined: Thu Mar 04, 2010 5:49 pm

Re: Remove Page Numbers from LoF and LoT

Post by buster »

amazing, thank you so much!!
Post Reply