[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: toc in sect1
/ Claus Rasmussen <claus@arsdigita.com> was heard to say: | Now, I would love to have toc's in every sect1 since I use sect1's as | chunks - as of now I only get a toc in every chapter. This seems to require | som stylesheet tweaking that I'm not quite sure how to do. I assume that I'm | not the first person in the world to want this - anybody have a hint? (Untested, but I think this'll work) Create a customization layer that contains: (define (section-element-list) (list (normalize "section") (normalize "sect1") (normalize "simplesect"))) (define ($section-toc$) ;; Called by the TITLE element so that it can come after the TITLE (build-toc (ancestor-member (current-node) (section-element-list)) (toc-depth (ancestor-member (current-node) (section-element-list))) #t)) (define ($section-body$) (make element gi: "DIV" attributes: (list (list "CLASS" (gi))) ($section-separator$) ($section-title$) ($section-toc$) (process-children))) Let me know if that doesn't work... Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | Simplicity is always a http://www.oasis-open.org/docbook/ | virtue.--Edward Abbey Chair, DocBook Technical Committee |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC