Hi Werner!
Attached is a lilypond source that shows how to use postscript
to crop parts from a lilypond page.
Obviously you still need to find a way to pass the right corner
coordinates to the postscript code ...
Knut
\version "2.21.0"
\pointAndClickOff
#(set-global-staff-size 18)
#(set-default-paper-size "a4")
\book {
\header {
title = \markup {
\postscript "
grestore
/myclipbox{
newpath
50 -5 moveto
50 0 rlineto
0 -50 rlineto
-50 0 rlineto
closepath
gsave 1 0 0 setrgbcolor stroke grestore
clip
} def
0 setlinewidth myclipbox
gsave
"
"Postscript Clipping Example"
}
tagline = ##f
}
\relative c' { \repeat unfold 100 { c4 d e f } }
\addlyrics { \lyricmode { \repeat unfold 100 { foo -- bar A B } } }
}
#(system "gs -dBATCH -dNOPAUSE -r900 -sDEVICE=png16 -sOutputFile=testclip.png testclip.pdf")
#(system "LD_LIBRARY_PATH= convert testclip.png -trim -shave 4x4 testclip-clipped.pgm")
#(system "LD_LIBRARY_PATH= potrace -b pdf -r 900 testclip-clipped.pgm")
#(system "LD_LIBRARY_PATH= rm testclip.png testclip-clipped.pgm")
#(system "LD_LIBRARY_PATH= okular testclip-clipped.pdf")
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user