Re: written spec - adding to the TOC

Nick Stoughton <[email protected]> Mon, 05 Dec 2005 09:25:23 -0800
Newsgroups gmane.linux.lsb.specification
Message-ID <1133803523.3326.4.camel@amstaff>
Please familiarize yourself with lsbspec/docbook_tutorial.txt ... which
has now been added to the Wiki.

On Mon, 2005-12-05 at 13:19 +0530, Pradosh Adoni wrote:
> On Thu, 2005-12-01 at 11:34 -0800, Nick Stoughton wrote:
> > On Thu, 2005-12-01 at 05:07, Pradosh Adoni wrote:
> > > what do I need to do to add my written spec so that it shows up in the
> > > TOC of the parent module spec  .. ? 
> > > 
> > > -- pradosh 
> > I'm not sure I fully understand this question.
> > 
> > A number of SGML tags make it to the TOC pages (and others also make it
> > to the pdf bookmarks if this is to be published in pdf).
> > 
> > Currently, the stylesheet (lsbspec/docbook-utils.dsl) adds things up to
> > heading-level 3 (except appendices, which only get their top level) to
> > the TOC, for both HTML and RTF.
> > 
> > This means that tags such as <PART> (level 0), <CHAPTER> (level 1),
> > <SECT1> and <SECT2> all go into the TOC.
> > 
> > A <REFENTRY> does not go into the TOC (but does go into the pdf
> > bookmarks).
> > 
> > The stylesheet is just another program ... and there is no technical
> > reason why Desktop couldn't use a different stylesheet to Core (though
> > I'd question the appropriateness of this at a different level). If you
> > wanted to have level 5 things in the TOC, its a simple change. Of
> > course, you have to learn DSSSL, a variant of Scheme, in tuen a variant
> > of Lisp, to figure out how to do this! The function is question is
> > called "toc-depth", and currently has the following definition for RTF:
> > 
> > ;;What depth should the TOC generate?
> > ;;not for appendices
> > ;;And sets have a toc for everything up front
> > (define (toc-depth nd)
> >   (if (string=? (gi nd) (normalize "book"))
> >       (if (gi (parent nd)) 
> >       0
> >       3)
> >       (if (string=? (gi nd) (normalize "appendix"))
> >         0
> >         (if (string=? (gi nd) (normalize "set"))
> >           5
> >           1))))
> > 
> > [[Hint ... change the '3' to some other value!! But please do not change
> > this in docbook-utils.dsl ... copy that and use a different stylesheet,
> > otherwise you'll wreck the ISO publication work I'm handling right
> > now.]]
> > 
> > On the other hand .... maybe you are asking quite a different question!!
> > If so, apologies, and please rephrase!
> 
> Ummm ... I was looking at which file I need to edit so that the spec
> generation scripts pick up that a new section was added , and add that
> section to the parent spec. for eg.
> I'm adding fontconfig to the desktop spec and I need that to show up in
> the TOC of the Desktop book (or spec.)
> 
> I'm trying to put a howto  together on adding to the spec here - 
> http://www.linuxbase.org/LSBWiki/WrittenSpecificationHowTo
> Currently I've just ripped Nilesh's excellent notes on this topic from
> the LibtoDB page 
> (sorry Nilesh :) ) and put them there to start off ..
> I'm hoping to get a full-fledged howto documented there, so you guys can
> add to that 
> 
> thanks
> -- pradosh 
> PS. Nick, the information you sent is still pretty useful though :)
> 
>