lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @ListItem and @NumberOf


From: Jeff Kingston
Subject: Re: @ListItem and @NumberOf
Date: Wed, 27 Jul 2005 07:57:56 +1100

> Cross referencing of list items yields just the number of the item,
> in Arabic, Roman, or whatever
>
> ... However, in fact it seems to always produce the number of the
> item, regardless of the list type.

Hmmm.  I seem to remember that there was some trouble, long ago,
fulfilling this promise.  And I've just been back to the code
(file include/bsf, line 1454) where it says this:

    @NumberMarker @Value {num}
    {style type num} &0io

That's to say, the label is being printed in the requested type
and style, but the value being remembered is just the Roman
number.  Immediately above it I see this:

    # @NumberMarker @Value {style num} {style num} &0io

suggesting that I tried it the other way but took it out.

I think the problem is that the style often includes
parentheses.  So if you ask for a @ParenRomanList,
you simultaneously get both roman and parentheses;
and then your choices for the result of @NumberOf
are either just a Roman number before applying the
style, or the number after the style is applied,
which is both in roman and parenthesized.  When
in fact you really want something in between.

I seem to have tried to solve this problem by breaking
the style into two: style, which does formatting, and
type, which converts to Roman (or not).  You can see
above the expression

    style type num

which first converts the number according to type and
then formats that according to style.  So the problem
might be fixable by changing the line to

    @NumberMarker @Value { type num }
    {style type num} &0io

I'm not sure why I didn't carry it through, perhaps
I forgot, or perhaps something else went wrong.

You could try it yourself if you like, otherwise
when I come back to this mail while preparing the
next Lout release I'll try it myself.

A horrible workaround is

    @Roman&&address@hidden myitem}

which takes the Arabic cross-reference number and
converts it back to Roman at the point of printing.

Jeff Kingston


reply via email to

[Prev in Thread] Current Thread [Next in Thread]