On 2010-12-17, Richard Heck wrote:
> On 12/17/2010 06:29 AM, Paul Sutton wrote:
>> Hi

>> I am trying to add a table of contents to my rugby club newsletter.  Do
>> I need  to use a separate file with information in?  I can use the menu
>> to add table of contents but the properties box for this doesn't list
>> anything if I click list of graphics it does, so I am guessing its
>> looking for something.

> By default, the table of contents includes only *numbered* sections and 
> such, which you probably do not have in your newsletter. So you have to 
> add them manually, via ERT:
>      \addcontentsline{toc}{section}{Title of Your Section}
>      \addcontentsline{toc}{subsection}{This Is a Subsection}
> and so forth. Here "toc" identifies the table of contents. Note that 
> this will not show in LyX's outline pane.

> Yes, it would be really nice if there were a way to do this without ERT.

Maybe a module that defines unnumbered section macros with contents-entry,
something like
  
  \newcommand{\listedsection}[1]{\section*{#1}%
                                 \addcontentsline{toc}{section}{#1}}
  ...                    

(in the preamble) and Styles to use them in LyX?

Günter


Reply via email to