On 6/15/21, Wim Stockman <wim.stock...@gmail.com> wrote: > Hi, I have a bunch of guitar tabs in plain text. > They consist of 4 lines that need to be grouped together. > So how can I tell groff when going to the next line the next line is 4 > lines
There may be a clever way to do this in groff, but my first impulse would be to run the input through a script (sed, perl, whatever you find easiest for manipulating text) to group it the way you want it, then pipe that script's output to groff. Having a custom preprocessor insert a simple begin/end macro pair around each four-line block should be sufficient to group the items in a way groff can see, but you have the flexibility to do much more complex processing if needed as well.