This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: (openjade + dsssl) changing <orderedlistnumeration="loweralpha"> rendering
- From: Yann Dirson <ydirson at fr dot alcove dot com>
- To: Dennis Grace <dgrace at us dot ibm dot com>
- Cc: Baráth Gábor <dincsi at elender dot hu>,docbook-apps at lists dot oasis-open dot org
- Date: Fri, 30 Aug 2002 10:15:25 +0200
- Subject: Re: DOCBOOK-APPS: (openjade + dsssl) changing <orderedlistnumeration="loweralpha"> rendering
- References: <OF99073E1A.8CFCFF6C-ON85256C24.004F4143@pok.ibm.com>
On Thu, Aug 29, 2002 at 09:36:00AM -0500, Dennis Grace wrote:
> (define (number-with-numeration node numeration number)
> (let* ((depth (length (hierarchical-number-recursive (normalize
> "orderedlist") node)))
> (rawnum (cond
> ((equal? numeration (normalize "arabic")) 1)
> ((equal? numeration (normalize "loweralpha")) 2)
> ((equal? numeration (normalize "lowerroman")) 3)
> ((equal? numeration (normalize "upperalpha")) 4)
> ((equal? numeration (normalize "upperroman")) 0)
> (else (modulo depth 5))))
> (num (case rawnum
> ((1) (format-number number "1"))
> ((2) (format-number number "a"))
> ((3) (format-number number "i"))
> ((4) (format-number number "A"))
> ((0) (format-number number "I")))))
> (if (> depth 5)
> (string-append "(" num ")")
> num)))
>
> I suppose (okay, it's a wild guess), in each case, replacing the "a" with
> "a)" should do what you want.
The "a" is a special format string and probably cannot be modified
this way. You should better enhance the logic in the last statement,
wich already adds parens, but in deeply-nested lists only.
--
Yann Dirson <Yann.Dirson@fr.alcove.com> http://www.alcove.com/
Technical support manager Responsable de l'assistance technique
Senior Free-Software Consultant Consultant senior en Logiciels Libres
Debian developer (dirson@debian.org) Développeur Debian