LyXShow unnumbered Chapters in the ToC

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Hélie
Posts: 8
Joined: Fri Dec 10, 2010 5:57 pm

Show unnumbered Chapters in the ToC

Post by Hélie »

Hey guys,

I am finishing my PhD thesis and I have a little problem: I don't want to number the Introduction and the conclusions. But if don't do it, they do not appear on the table of content.
How can I make appear these unnumbered chapters in the table of content?

I am using LyX 2.0.0 and an example is attached.

Thank you in advance for any help you can give

Hélie
Attachments
example.zip
(870 Bytes) Downloaded 235 times

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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Show unnumbered Chapters in the ToC

Post by cgnieder »

I don't know about Lyx but \addcontentsline helps:

Code: Select all

\documentclass{article}
\begin{document}
\tableofcontents
\section*{Without number}\addcontentsline{toc}{section}{Ohne Nummer}

\section{With number}

\newcommand*\sectotoc[1]{\section*{#1}\addcontentsline{toc}{section}{#1}}

\sectotoc{Again without number}

\end{document}
Regards
site moderator & package author
Hélie
Posts: 8
Joined: Fri Dec 10, 2010 5:57 pm

Re: Show unnumbered Chapters in the ToC

Post by Hélie »

Thank you very very much cgnieder !

In Lyx, you just have to insert the code in an ERT \addcontentsline{toc}{chapter}{General Introduction}
Post Reply