Generalremove chapter numbers in table of contents

LaTeX specific issues not fitting into one of the other forums of this category.
webhead
Posts: 26
Joined: Sat Jul 19, 2008 5:29 pm

Re: remove chapter numbers in table of contents

Post by webhead »

Oh, sorry, I didn't supply enough information. What I'm trying to do is where it presently says "Chapter", I want the actual chapter name.
Keep to the Code.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

remove chapter numbers in table of contents

Post by Stefan Kottwitz »

How about this:

Code: Select all

\setcounter{secnumdepth}{-1}
...
\begin{document}
\tableofcontents
\pagestyle{myheadings}
\chapter{A Letter}
\markboth{A Letter}{}
...
Stefan
LaTeX.org admin
webhead
Posts: 26
Joined: Sat Jul 19, 2008 5:29 pm

Re: remove chapter numbers in table of contents

Post by webhead »

That got the chapter names, thanks!

But it still works even without the setcounter line, for whatever reason.

I didn't include a preface in the sample but it keeps the title "contents", but that should be taken care of the same way I would think. And the book name doesn't print at all, but I'm happy to have the chapter name most of all.

Thanks again for your help. :D
Keep to the Code.
Post Reply