This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (openjade + dsssl) changing <orderedlistnumeration="loweralpha"> rendering


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]