Text Formattingsection title without numbering and part of the content list

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
rudrales
Posts: 16
Joined: Wed Mar 11, 2009 1:52 am

section title without numbering and part of the content list

Post by rudrales »

I write an abstract for my project. It takes place on the second page. I don't like numbering only this section title because the content list is after the section title 'abstract' but the section title 'abstract' has to be part of the content list. Does somebody know the code for my problem? I think it's something with \phantomsection but if I write it like this:

Code: Select all

\phantomsection
\section{Abstract}
... the the section title 'abstract' isn't part of the content list.

Thank for your help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

section title without numbering and part of the content list

Post by localghost »

Even this should generate a ToC entry with a numbered section "Abstract". To get the desired result, you have to supplement this.

Code: Select all

\phantomsection
\section*{Abstract}
\addcontentsline{toc}{section}{Abstract}
This will leave you with an unnumbered and linked section entry in the ToC.


Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
rudrales
Posts: 16
Joined: Wed Mar 11, 2009 1:52 am

Re: section title without numbering and part of the content list

Post by rudrales »

The suggested code is working fine. Thank you, Thorsten. Now, everything is how I like it.
Post Reply