I want to list only chapters, not sections, in the TOC.
My cusomization worked with stylesheets up to 1.64:
;; Returns the depth of auto TOC that should be made at
(define (toc-depth nd)
(if (string=? (gi nd) (normalize "book"))
1 ;; only chapters in TOC
In 1.71, there is a new line (line 70) in
keep-with-next?: (if (= level 1) #t #f)
When toc-depth = 2, everything processes correctly
except that the first level of sections get listed and
I want to avoid that.
When toc-depth = 1, the TOC gets bumped from page iii
to iv and runs off the bottom of page iv. Page iii
(formerly first page of TOC) is now blank. When I
comment out line 70 of print/dbautoc.dsl, my book
processes correctly, i.e. chapters, no sections in TOC,
and all is right with the world.
I tried the following, but apparently my kung foo is
not the best:
keep-with-next?: (if (and (= level 1) (> toc-depth
1)) #t #f)
toc-depth is apparently the wrong type for making a
numerical comparison with ">".
While we are on the subject, it might be nice to have a
parameter in dbparam.dsl to control the depth of the
TOC, rather than having to include modified dsssl in
the customization. Something like:
;; REFENTRY toc-entry-depth
;; PURP Controls the depth (Chapter, Section) in the