Idea Delivered Partially

Clarification - the implementation noted in XPP 9.4, using the Perl function: $X->get_reg("#foo[:[-]level]")

does not cover the specific use case of accessing the named number register from the frill back to the main text. 

Would it be helpful to get a number register (we would assume "level 0"), via its name?

Access Named Number Registers (counters) from a frill block

In order to make named number registers as useful as normal number registers we need the possibility to read out the content of a named number registers from the frills (or other) stream.
We would need both a macro (equivalent of the mr macro) and a xyPerl function (the equivalent of the $X->get_main_numreg() function)

Parents
  • the X->get_reg(("#foo[:[-]level]") is only valid for calling Named Number Registers in the main stream.
    This does not do any good for my request to be able to call from the frills (or any other stream) a Named Number Register defined the main stream.
    So please complete the implementation by extending the $X->get_main_numreg() function in the same way as for the $X->get_reg() function.

    $X->get_main_numreg('#chapter, 'f') called from the frills stream would give you the first defined value on the page of the named register called 'chapter' - since no level is specified level 0 would be used (which probably covers the great majority of possible applications.

    In case it would not be much trouble, feel free to add the same possibility as for the get_reg(): 
    $X->get_main_reg('#chapter:2, 'f') would give the first defined on the page value for level 2 of the chapter counter.

Comment
  • the X->get_reg(("#foo[:[-]level]") is only valid for calling Named Number Registers in the main stream.
    This does not do any good for my request to be able to call from the frills (or any other stream) a Named Number Register defined the main stream.
    So please complete the implementation by extending the $X->get_main_numreg() function in the same way as for the $X->get_reg() function.

    $X->get_main_numreg('#chapter, 'f') called from the frills stream would give you the first defined value on the page of the named register called 'chapter' - since no level is specified level 0 would be used (which probably covers the great majority of possible applications.

    In case it would not be much trouble, feel free to add the same possibility as for the get_reg(): 
    $X->get_main_reg('#chapter:2, 'f') would give the first defined on the page value for level 2 of the chapter counter.

Children
No Data