Menu

#5 Wrong handling of nested itemizedlists

open
nobody
None
5
2009-04-27
2001-07-26
Yann Dirson
No

The following SGML construct is wrongly rendered:

<ItemizedList>
<ListItem>
<ItemizedList><title>Conseil</title>
<ListItem>
<Para>item</Para>
</ListItem>
<ListItem>
<Para>item</Para>
</ListItem>
</ItemizedList>
</ListItem>
</ItemizedList>

The bullet for the outer list is alone on his line,
and the title of the inner list is on the following
line.

I could get a better result using the following
customization, but I believe my redefinition of $list$
is not completely correct.

;;
;; Don't start a block element for itemizedlist title
just inside
;; a listitem, so that it looks correct
;;

(element (listitem itemizedlist title)
(make sequence
use: title-style
(process-children)))

;; put the title itself outside the displaygroup for
the same reason
(define ($list$)
(make sequence
(process-node-list
(select-elements (children (current-node))
(normalize "title")))
(make display-group
start-indent: (if (INBLOCK?)
(inherited-start-indent)
(+ %block-start-indent% (inherited-start-indent)))
space-after: (if (INLIST?) %para-sep% %block-sep%)

(process-node-list (node-list-filter-by-not-gi
(children (current-node))
(list (normalize "title")))))))

Discussion

  • Yann Dirson

    Yann Dirson - 2001-08-10

    Logged In: YES
    user_id=38086

    My patch does no handle nested orderedlists, which suffer
    the same problem.

    This also occurs within HTML output.

     
  • Peter Eisentraut

    • milestone: --> 447636
     
  • Robert Stayton

    Robert Stayton - 2009-04-27
    • labels: 321158 -->
    • milestone: 447636 -->
     

Log in to post a comment.

MongoDB Logo MongoDB