Re: DocBook print backend: lists and IDs

Subject: Re: DocBook print backend: lists and IDs
From: Norman Walsh <ndw@xxxxxxxxxx>
Date: Tue, 26 May 1998 19:29:17 +0200
/ marcusd@xxxxxxxxxxxxxxxxxxxxx (Marcus G. Daniels) was heard to say:
| 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>

This is an extremely ugly problem.  In order to format a list item correctly,
it must be something like this:

  (make paragraph start-indent: something 
                  first-line-start-indent: -something
    (make line-field 
          field-width: something
          (the-list-item-dingbat))
    (the-content-of-the-first-paragraph))

Unfortunately, if the first element in a list item is a block
element, then formatting that object will cause a line break
after the bullet.

So, in order to avoid this problem, the actual first object in a
list item is never formatted, instead its children are
formatted.  The first child is formatted in the paragraph to the
right of the bullet and the rest of the children are formatted
below.

Yuck.

This is why the ID on FUNCSYNOPSIS goes away.  It's because the
FUNCSYNOPSIS element is never formatted, only its children are
formatted.

I can't think of any way to solve this problem without creating
a special case for each possible element that might occur first
in a list item (which is almost all block elements).  And each
special case would involve a hairy test of
(absolute-first-child), so I don't want to do that.

Help!?

| 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.

Unfortunately FUNCSYNOPSIS isn't a verbatim environment.  And,
while I haven't tried your modification, by inspection I don't
think that it would work.  As near as I can tell, a FUNCSYNOPSIS
(for example) _inside_ the first paragraph of a list item would
get skipped.  But I could be wrong.

--norm


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Re: DocBook print backend: lists and IDs
    • Marcus G. Daniels - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id SAA26118Fri, 22 May 1998 18:55:36 -0400 (EDT)
      • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id NAA08990Tue, 26 May 1998 13:41:24 -0400 (EDT) <=
        • Marcus G. Daniels - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id NAA09392Tue, 26 May 1998 13:57:54 -0400 (EDT)