[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TOCs in articles?


Frederik Fouvry from the KDE DocBook Team solved my problem. The relevant
part of his message is below.

Frederik Fouvry wrote:
> | When I used <book>... </book> as the overrall element, I simply put
> | a <toc></toc> at the point where I wanted the TOC and it was very nicely
> | generated.
> There are two variables in the style sheets (forgot which ones, but
> they should be in the dbparam.dsl file), one for book and one for
> article.  Just set the one for articles to t and run the conversion.

He was right on target. There's a variable there called
'%generate-article-toc%' that is set to "f" by default in the Norman
Walsh DocBook DSSSL files.  I changed it to "t", re-ran openjade, and
my TOC appeared there perfectly fine. (and without a <toc></toc> tag set
which Frederik tells me is only for manual TOC creation)

Interestingly, I looked in the "ldp.dsl" file that I downloaded from the LDP
site and found that in that file "%generate-article-toc%" is set to "t"
also.  However, before I changed "dbparams.dsl", I did try running openjade
with 'ldp.dsl' and found that it looked pretty much identical to when I ran
openjade with 'docbook.dsl' - and did not have a TOC.  After I changed the
dbparams.dsl file, using openjade with either ldp.dsl or docbook.dsl seemed
to generate the same output - and both with a TOC.

However, the TOC was only one-level deep and I thought one of the things the
LDP stylesheet was to do was to make the TOC deeper. And from how I read it,
I would have expected the ldp.dsl file to override the dbparams.dsl file.

Is it possible that I don't have the "ldp.dsl" stylesheet installed correctly?

I just put it in the directory where the Norman Walsh stylesheets are (on my
system, /usr/lib/sgml/stylesheets/docbook/html and .../docbook/print). I called
it with:

 openjade -d /usr/lib/sgml/stylesheets/docbook/html/ldp.dsl -t sgml

Thanks to Frederik I now have a TOC.  If someone can tell me if I have the LDP
stylesheet installed wrong, that might solve future problems.


Dan York,  Linuxcare, Inc.
dyork@linuxcare.com    http://www.linuxcare.com/
1-603-264-0129 mobile, 603-268-0691 tel, 603-268-0103 fax
Linuxcare.  Support for the revolution.

To UNSUBSCRIBE, email to ldp-docbook-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org