Re: written spec - adding to the TOC
Nick Stoughton <[email protected]> Thu, 01 Dec 2005 11:34:25 -0800
| Newsgroups | gmane.linux.lsb.specification |
|---|---|
| Message-ID | <1133465664.15939.8332.camel@collie> |
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!
--
Nick
>
> ______________________________________________________________________
> _______________________________________________
> lsb-spec mailing list
> [email protected]
> http://mail.freestandards.org/mailman/listinfo/lsb-spec