[texhax] \tableofcontents and section numbering

Philip G. Ratcliffe philipratcliffe at tiscali.it
Sun Nov 30 23:41:56 CET 2003


> > >When I use \section*{Whatever}, that section does not appear in
> > >\tableofcontents, but I want it to be there. What can I do?
> >
> > Use \section{Whatever}.
>
> Hummmm let me explain better. When I say:
>
> > > I'm trying to do something like this
> > > \def\thesection{}
> > > \section{Whatever}
> > >
> > > The only problem is that my section keeps the indentation.
> How can I set
> > > the indentation to 0pt in this case?
>
> I mean I'm using \section{Whatever}, whithout numbering
> (\def\thesection{}) and it does appear in \tableofcontents. The problen
> is that, instead of (these are section titles in the body of the
> document)
>
> 1 blah
> 2 blablah
> Wathever
>
> I get
>
> 1 blah
> 2 blablah
>   Wathever
>
> So I want to know what can I do (probably in the command
> \def\thesection{}) to avoid this indenting.

"The UK TEX FAQ - Your 322 Questions Answered" (version 3.9, date
2003/08/29, Robin Fairbairns, August 29, 2003) no. 182

Try

\setcounter{secnumdepth}{-1}
\section{Second section}
\setcounter{secnumdepth}{3}

Cordialmente,  Philip G. Ratcliffe



More information about the texhax mailing list