Re: Tables in RTF backend & element numbering

Subject: Re: Tables in RTF backend & element numbering
From: Vivek Agrawala <vivek@xxxxxxxxxxxxxxx>
Date: Fri, 01 Aug 1997 08:06:40 -0400
Frank Christoph wrote:

> My second question concerns numbering of elements with different GIs.
> I have something like this in my document:
> 
> <A>
>   <B>here</B>
>   <C>there</C>
>   <D>everywhere</D>
> </A>
> 
> and I want to format this as
> 
> A
>   1. B
>      here
>   2. C
>      there
>   3. D
>      everywhere
> 
> so at first I used (child-number) to generate the numbers but soon realized
> that this doesn't work because (child-number) applies to elements with the
> same GI, and here I have three different GIs under A.  Is there a simple
> way I can get this effect?

This came up some time back.

Here is the solution that was proposed (by Paul, I think):

;; -- Similar to child-number, but also counts siblings with a GI
;; -- different than that of 'snl'.
(define (absolute-child-number snl)
  (+ 1 (node-list-length (preced snl))) )


-- Vivek Agrawala, Ph.D.
Siemens Corporate Research, Inc.	email: vivek@xxxxxxxxxxxxxxx

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


Current Thread