Subject: TOC problem with HTML32 dsssl From: Nigel Hutchison <nwoh@xxxxxxxxxxxxxx> Date: Wed, 15 Oct 1997 15:58:38 +0200 |
Dear All I am trying to improve the TOC feature of the HTML32.dsl and Jade If there is an H1 but no H2 etc you get an empty table of contents. which looks a bit odd. I tried changing MAKETOC to detect this but I can't work out whether the sosofo I get back when I call (with-mode toc (process-node-list (ancestor "BODY"))) is "empty " or not. I've tried if xbody (....) (...) ; always true :-( if (> (length xbody) 0) (..) (..) ; not a list :-( Any ideas ? Here the code that doesn't work (Horrible Scheme syntax I know ) (define (MAKETOC) (if %toc?% (let ((xbody (with-mode toc (process-node-list (ancestor "BODY"))))) ;; Conditional expression?? (if (> (length xbody) 0) (sosofo-append (MAKEBODYRULE) (make paragraph font-family-name: %title-font-family% font-weight: 'bold font-posture: 'upright font-size: (HSIZE 2) line-spacing: (* (HSIZE 2) %line-spacing-factor%) space-before: (* (HSIZE 2) %head-before-factor%) space-after: (* (HSIZE 2) %head-after-factor%) start-indent: %body-start-indent% quadding: 'start keep-with-next?: #t (literal "Table of Contents")) ; (with-mode toc (process-node-list (ancestor "BODY"))) xbody (MAKEBODYRULE)) (empty-sosofo) ) ) (empty-sosofo)) ) regards Nigel W. O. Hutchison Technical Consultant Software AG Germany mailto:nwoh@xxxxxxxxxxxxxx Tel +49 (0)6151 92 1207 * DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: : tables html dsssl column widt, Nigel Hutchison | Thread | Re: TOC problem with HTML32 dsssl, Dave Love |
Re: : tables html dsssl column widt, Nigel Hutchison | Date | Jade and display-space, Alex Milowski |
Month |