groff
[Top][All Lists]
Advanced

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

Re: Guitar TABs


From: Wim Stockman
Subject: Re: Guitar TABs
Date: Wed, 16 Jun 2021 10:11:29 +0200

Hi; Dave , yes I was also thinking of a preprocessor.
I already made a small preprocessor to keep track of chords , in a
chordsheet.
Where I use the move command to place the chord above the correct word. And
this works fine.
Maybe I'll take this a step further and make it good for more lines.
if you want to have a look at my awk scribble. I'll enclose it as an
attachment.

The attachments are:
song.txt : This is how a get the chord sheets from other band members
song.pcs: Add the preprocessor markup
song.pdf: The final result , for output on a kindle paperwhite 2 ereader
kindle.tmac: Macro to set the papersize for groff for the kindle paperwhite
2 ereader
song.tmac: Macro set to make up the layout.
compile instruction: awk -f pcs.awk song.pcs | groff -k -P-p12c,9c -mkindle
-msong -M "directory where the kindle macro is" | ps2pdf - - > song.pdf

Any suggestions are welcome.

Kind regards
Wim Stockman


Op wo 16 jun. 2021 om 09:12 schreef Dave Kemper <saint.snit@gmail.com>:

> On 6/15/21, Wim Stockman <wim.stockman@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.
>
>

Attachment: song.txt
Description: Text document

Attachment: song.pcs
Description: Binary data

Attachment: song.tmac
Description: Binary data

Attachment: pcs.awk
Description: application/awk

Attachment: song.pdf
Description: Adobe PDF document

Attachment: kindle.tmac
Description: Binary data


reply via email to

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