Capture the line during the frills processing

Hi

I have a question with frills processing and appreciate if anyone could give me a hand.

We are using XPP 8.4 in Unix. We would like to use XyPerl to capture the line and send back to the division during the frills processing. We are able to open the main stream and access named number registers from a frill block but find difficulty in capturing the line.

Does anyone has an idea on this? Thanks

 

Terrence

  • Terrence,

    I think you are better off preprocessing (=transforming) the incoming text so that you can mark the end of the second capture, so that things look like:
    %<ufm>AAA<ufn>[tag]<index>B1</index> The following tables summarize..

    Like this you do not have to capture the whole para in xyPerl. You do not want to do this because it makes editing the text in the xyview a lot more difficult.

    As for the <index>..</index> macros, you define them to call a xyPerl function with the 'i' mode flag set so that you capture just the B1 thing.
    remark 1: do not forget to sue the '+' sign as the first character in the expansion of the <index> macro.
    remark 2: do not forget to strip the <index> and </index> macros from the captured text in your xyPerl

    As for storing multiple occurrences of the <index> thing on the same page, there are several solutions possible.
    Probably the easiest one is to use an array (@Index) and push each capture onto the array.
    And then during frills processing you unshift each index term every time you hit a line with an <index> macro.
    (you will need to flag these line and find a way of knowing if the flag is used for a margin note or an index term).
    At the end of the frills processing you undef the @index arrary so it is ready for the next page.

    You might come up with another solution that suits your needs better.
    Like if the index term always appears where there is a margin note, you might put both pieces of text into the 0 register using a slightly different transformation and split them later using xyPerl.

    Good luck.

    Bart