> Bruce Momjian wrote:
> 
> > Can someone suggest why an un-numbered Chapter called "Preface", and my
> > Bibliography section do not appear in the table of contents(TOC)?  They
> > don't appear in the TOC popup box, nor do they appear in the printed TOC
> > pages.  There appear as pages in the printout, just not in the TOC.
> 
> Tables of contents entries are generated only by the sectioning commands. In
> order to add a new entry you should type in Tex mode the following command:
> \addcontentsline{toc}{sec_unit}{entry}
> where sec_unit is chapter, section... as you want the appearance in the toc
> and entry is Preface, Bibliography, Goofy or anything else!
> Put the command just after the right heading in your document (but check the
> page number in the toc... in the past were reported some problems of a wrong
> page number... so you should adjust the position of the command}.
> Hope this help.
> Bye

[Hope it OK I am Cc'ing to the LyX list.]

After looking at the latex output, I saw that this was a Latex problem,
and found the extact text you describe in the Usenet archives, added it
for Preface, and it works great.  Nice trick.  [I have Lamports book and
the LaTeX Companion on order, so I should be asking fewer questions in
the future.  Also, I will be try to mention LyX/LaTeX in the Preface
somewhere.]

However, I couldn't figure out how to get put the Latex inline code in
the bibliography.  I can put it before the bibliography starts, but that
doesn't help because it shows the wrong page number.  I can put it at
the end of the bibliography, but that doesn't work if the bibliography
is more than one page in length.

While my original problem was LaTeX-related, this may be LyX-specific.
My solution was to put \addcontentsline...{} as TeX-Style just
before the first bibliographic entry, so it reads:

        [1]\addcontentsline...{}Author, Title
           ^^^^^^^^^^^^^^^^^^^^^
           TeX-style here

Seems like that is the solution.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  [EMAIL PROTECTED]                |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Reply via email to