Hey, thanks! That was enough of a clue that, with the help of TFM, I
was able to put together a perl program that adds bits of text to the
top left, top center, and/or top-right of a PS page. I now have some
pages of folk-dance music with succinct labels at the upper corners
that identify the dance. This makes for much faster lookups in a
binder full of pages. It also helps prevent people from "refiling" a
page in a location that it can't be found again. People seem to
easily pick up on the idea that these corner labels are intended for
alphabetization.
It might be useful to include something for this purpose in abc2ps
and other music formatters. But for now, having a separate program
that adds such text is good enough. And I just might find it useful
with other PS files, too.
Dave wrote:
| That's how I do it. I have a script called "b-flat.pl" (attached)
| which takes a PS file on stdin and outputs the same file with the logo
| "(for Bb instruments)" in grey at the bottom left of each page. You can
| probably adapt it to add whatever you want.
...
| #!/usr/bin/perl
| $flag = 0;
| while (<>) {
| if (/^%%Page:/) {
| if ($flag) {
| print "grestore\n";
| }
| $flag = 1;
| print $_;
| print "gsave\n";
| print ".50 setgray\n";
| print "/Helvetica findfont 12 scalefont setfont\n";
| print "20 20 moveto\n";
| print "(for Bb instruments) show\n";
| print "grestore\n";
| } else {
| print;
| }
| }
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html