General ⇒ Different Depth for ToC and LoF/LoT?
Different Depth for ToC and LoF/LoT?
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Different Depth for ToC and LoF/LoT?
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}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Different Depth for ToC and LoF/LoT?
Thanks a lot, and sorry for not providing a minimal example!