GeneralDifferent Depth for ToC and LoF/LoT?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Matifou
Posts: 23
Joined: Fri Jan 14, 2011 11:27 am

Different Depth for ToC and LoF/LoT?

Post by Matifou »

Hi

I wish to have a different counter depth for TOC than for LO (tables, figures, ...). This comes from the fact that for a book, I only want to show thte chapter title (depth 0), but still want to have a non-empty list of tables...

Is it possible to define two different counters? Do I need to redefine some list of tables commands?

Thanks!!

Matthieu
Last edited by Matifou on Thu Feb 24, 2011 2:13 pm, 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.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Different Depth for ToC and LoF/LoT?

Post by localghost »

It can never do any harm to provide a minimal example.

Code: Select all

\documentclass[11pt,a4paper,english]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{blindtext}

\setcounter{tocdepth}{0}

\begin{document}
  \tableofcontents
  \setcounter{tocdepth}{2}
  \listoffigures
  \listoftables
  
  \blinddocument

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

  \blinddocument

  \begin{table}[!ht]
    \centering
    \rule{6.4cm}{3.6cm}
    \caption{Dummy table}\label{tab:dummy}
  \end{table}
\end{document}
Matifou
Posts: 23
Joined: Fri Jan 14, 2011 11:27 am

Re: Different Depth for ToC and LoF/LoT?

Post by Matifou »

Great! It was actually quite simple, just introducing the command twice!

Thanks a lot, and sorry for not providing a minimal example!
Post Reply