Subject: Re: DocBook print backend: lists and IDs From: marcusd@xxxxxxxxxxxxxxxxxxxxx (Marcus G. Daniels) Date: Fri, 22 May 1998 18:50:28 -0400 (EDT) |
In the print backend, I find that it isn't possible to get the IDs for the immediate contents of a LISTITEM noted for the purpose of cross referencing. For example, the following SGML ends up ignoring the ID of FUNCSYNOPSIS because that node is never processed, which means that all addresses that refer to that node or ID fail to resolve. <ITEMIZEDLIST> <LISTITEM> <FUNCSYNOPSIS ID="SOME.IDENTIFIER"> </LISTITEM> </ITEMIZEDLIST> Here's a possible workaround. I added FUNCSYNOPSIS as a verbatim display as well. The sequence around the childrens' content is to prevent problems with TeX backend. *** generic-list-item Fri May 22 13:53:10 1998 --- generic-list-item-new Fri May 22 13:59:07 1998 *************** *** 1,29 **** ! (define (generic-list-item indent-step line-field) ! (let* ((itemcontent (children (current-node))) ! (first-child (node-list-first itemcontent)) ! (spacing (inherited-attribute-string (normalize "spacing")))) ! (make sequence ! start-indent: (+ (inherited-start-indent) indent-step) ! (make paragraph ! use: (cond ! ((equal? (gi first-child) (normalize "programlisting")) ! verbatim-style) ! ((equal? (gi first-child) (normalize "screen")) ! verbatim-style) ! ((equal? (gi first-child) (normalize "synopsis")) ! verbatim-style) ! ((equal? (gi first-child) (normalize "literallayout")) ! linespecific-style) ! ((equal? (gi first-child) (normalize "address")) ! linespecific-style) ! (else ! para-style)) ! space-before: (if (equal? (normalize "compact") spacing) ! 0pt ! %para-sep%) ! first-line-start-indent: (- indent-step) ! (make sequence ! use: para-style ! line-field) ! (process-node-list (children first-child))) ! (process-node-list (node-list-rest itemcontent))))) --- 1,43 ---- ! (define (skip-content) ! (make sequence ! (process-node-list (children (current-node))))) ! (element (listitem programlisting) (skip-content)) ! (element (listitem screen) (skip-content)) ! (element (listitem synopsis) (skip-content)) ! (element (listitem funcsynopsis) (skip-content)) ! (element (listitem literallayout) (skip-content)) ! (element (listitem address) (skip-content)) ! (element (listitem para) (skip-content)) ! (element (listitem formalpara) (skip-content)) ! ! (define (generic-list-item indent-step line-field) ! (let* ((itemcontent (children (current-node))) ! (first-child (node-list-first itemcontent)) ! (spacing (inherited-attribute-string (normalize "spacing")))) ! (make sequence ! start-indent: (+ (inherited-start-indent) indent-step) ! (make paragraph ! use: (cond ! ((equal? (gi first-child) (normalize "programlisting")) ! verbatim-style) ! ((equal? (gi first-child) (normalize "screen")) ! verbatim-style) ! ((equal? (gi first-child) (normalize "synopsis")) ! verbatim-style) ! ((equal? (gi first-child) (normalize "funcsynopsis")) ! verbatim-style) ! ((equal? (gi first-child) (normalize "literallayout")) ! linespecific-style) ! ((equal? (gi first-child) (normalize "address")) ! linespecific-style) ! (else ! para-style)) ! space-before: (if (equal? (normalize "compact") spacing) ! 0pt ! %para-sep%) ! first-line-start-indent: (- indent-step) ! (make sequence ! use: para-style ! line-field) ! (process-node-list first-child)) ! (process-node-list (node-list-rest itemcontent))))) DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
question about communicating with j, Graydon Hoare | Thread | Re: DocBook print backend: lists an, Norman Walsh |
Re: COOKBOOK: Hierarchical numberin, Tony Graham | Date | Re: COOKBOOK: Hierarchical numberin, Daniel Speck |
Month |