[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quick question: how to do .index in groff?
From: |
Denis M. Wilson |
Subject: |
Re: Quick question: how to do .index in groff? |
Date: |
Fri, 24 Jul 2020 14:00:56 +0100 |
To implement .index as a macro one could consider using .substring
together with the Knuth-Morris-Pratt algorithm. I've done simpler
things eg the equivalent of The C library substr().
Denis
On Thu, 23 Jul 2020 16:13:41 -0700
B 9 <hackerb9@member.fsf.org> wrote:
> Heirloom Troff has a handy string search function called .index which
> works like this:
>
> .index R xx string
>
> The position where string occurs in xx is stored in register R.
>
> It doesn't seem to work yet in Groff, but I'm hoping somebody has a
> macro that implements .index.
>
> Thanks,
>
> --b9
>
--
- Quick question: how to do .index in groff?, B 9, 2020/07/23
- Re: Quick question: how to do .index in groff?, John Gardner, 2020/07/23
- Re: Quick question: how to do .index in groff?, Denis M. Wilson, 2020/07/24
- Re: Quick question: how to do .index in groff?,
Denis M. Wilson <=
- Re: Quick question: how to do .index in groff?, B 9, 2020/07/25
- Re: Quick question: how to do .index in groff?, Denis M. Wilson, 2020/07/27
- Re: Quick question: how to do .index in groff?, B 9, 2020/07/31
- Re: Quick question: how to do .index in groff?, John Gardner, 2020/07/31
- Re: Quick question: how to do .index in groff?, Tadziu Hoffmann, 2020/07/31
- Re: Quick question: how to do .index in groff?, Denis M. Wilson, 2020/07/31
Re: Quick question: how to do .index in groff?, Bjarni Ingi Gislason, 2020/07/25