🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #1062

RE: Contents file and \section* commands

#1062
From: George D. Greenwade
Date: Fri, 07 Aug 1992 21:05
39 lines
2344 bytes
On Fri, 7 Aug 92 15:56:25 BST, <da188@city.ac.uk> asked:

> If the first page of a document (report style), is a \section* command,
> LaTeX will not place it in the contents page even tho' I have asked it to
> do so:
> 
> \addcontentsline{toc}{section*}{Abstract}
> \section*{Abstract}
> 	:
> \section{next section etc}
> 
> Can anyone tell me what Im doing wrong? If its any use, the contents page
> appears after the page with the Abstract on it.

Just use 
 \addcontentsline{toc}{section}{Abstract}
and an unnumbered entry in the toc will be there, formatted at the \section
level.  Check p. 159 of Lamport -- you'll see that the use of
\addcontentsline only includes a number if you hard code it in with
\protect\numberline{sec_num}{heading} (or use the direct sectioning command
instead of the "starred" variant form, in which case it is automagically
done for you).

The reason for this is that the "starred" sectioning variants are exactly
that to LaTeX's logic -- variants and not "true" sectioning units (i.e.,
the behave as if they were true sectioning units, but exclude the \protect
string from above).  The location of the abstract has nothing to do with
the location of the printed toc -- it will require a subsequent processing
pass to get the numbers and formatting there anyway.

Regards,   George
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
George D. Greenwade, Ph.D.                            Bitnet:  BED_GDG@SHSU
Department of Economics and Business Analysis         THEnet: SHSU::BED_GDG
College of Business Administration                    Voice: (409) 294-1266
P. O. Box 2118                                        FAX:   (409) 294-3612
Sam Houston State University              Internet:        bed_gdg@SHSU.edu
Huntsville, TX 77341                      bed_gdg%SHSU.decnet@relay.the.net
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Technical Details
Message-ID: <0095EBF3.A672A800.14655@SHSU.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!noiro.acs.uci.edu!unogate!mvb.saic.com!info-tex

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!noiro.acs.uci.edu!unogate!mvb.saic.com!info-tex
From: "George D. Greenwade" <bed_gdg@SHSU.edu>
Newsgroups: comp.text.tex
Subject: RE: Contents file and \section* commands
Message-ID: <0095EBF3.A672A800.14655@SHSU.edu>
Date: Fri, 07 Aug 1992 16:05:22 CDT
Organization: Info-Tex<==>Comp.Text.Tex Gateway
X-Gateway-Source-Info: Mailing List
Lines: 39