On Wed, 2021-09-01 at 16:24 +0200, Jean Abou Samra wrote: > Le 01/09/2021 à 15:11, Rene Brandenburger a écrit : > > I use the \postscript a lot when typesetting contemporary music > > e.g. > > like this: > > > > \version "2.20.0" > > > > > > wave_line = \markup { > > \with-dimensions #'(0 . 0) #'(0 . 0) > > \postscript #"0.3 setlinewidth 1 setlinecap [0 1] > > 0 0 0 setrgbcolor 0.00 -3.50 moveto > > 0.23 -3.71 0.47 -3.93 1.00 -4.00 curveto > > 1.53 -4.07 2.36 -4.00 3.00 -3.50 curveto > > 3.64 -3.00 4.11 -2.07 4.50 -1.46 curveto > > 4.89 -0.84 5.22 -0.55 6.00 -0.80 curveto > > 6.78 -1.05 8.03 -1.83 9.00 -1.53 curveto > > 9.97 -1.23 10.66 0.15 11.50 0.50 curveto > > 12.34 0.85 13.32 0.17 14.00 -0.50 curveto > > 14.68 -1.17 15.05 -1.84 16.00 -2.50 curveto > > 16.95 -3.16 18.47 -3.82 20.00 -4.49 curveto > > stroke " > > } > > > > \relative c''{ > > s1*5^\wave_line > > } > > > This use case continues to be supported with > Cairo. Just convert \postscript to \path, wich > works both in the current PS backend and with Cairo. > > \version "2.22.1" > > wave_line = \markup { > \with-dimensions #'(0 . 0) #'(0 . 0) > \path #0.5 > #'((moveto 0.00 -3.50) > (curveto 0.23 -3.71 0.47 -3.93 1.00 -4.00) > (curveto 1.53 -4.07 2.36 -4.00 3.00 -3.50) > (curveto 3.64 -3.00 4.11 -2.07 4.50 -1.46) > (curveto 4.89 -0.84 5.22 -0.55 6.00 -0.80) > (curveto 6.78 -1.05 8.03 -1.83 9.00 -1.53) > (curveto 9.97 -1.23 10.66 0.15 11.50 0.50) > (curveto 12.34 0.85 13.32 0.17 14.00 -0.50) > (curveto 14.68 -1.17 15.05 -1.84 16.00 -2.50) > (curveto 16.95 -3.16 18.47 -3.82 20.00 -4.49)) > } > > { s1*5^\wave_line } > > [...] > > > Denemo uses postscript to generate a title page with a border. > > From a glance at the output of > > git grep "\\\\postscript" > > in the Denemo repository, that should be easy to convert > to \path as above.
it was this paper block I had in mind specifically (though I guess creating customized ornaments done via eps files would also fail): \paper { bookTitleMarkup = \markup \when-property #'header:title { { \postscript #" gsave initmatrix 1 setlinewidth 40 40 moveto 517 0 rlineto 0 760 rlineto -517 0 rlineto 0 -760 rlineto stroke 0.5 setlinewidth 45 45 moveto 507 0 rlineto 0 750 rlineto -507 0 rlineto 0 -750 rlineto stroke grestore" } \line { \hspace #-1.45 %for some reason the column is centered without this \column { \when-property #'header:poet \vspace #denemo-top-margin \when-notproperty #'header:poet \vspace #(+ 10 denemo-top-margin) \fill-line { \fontsize #8 \italic \fromproperty #'header:composer } \vspace #1 \when-property #'header:poet \fill-line { \fontsize #8 \italic \fromproperty #'header:poet } \when-property #'header:poet \vspace #6 \when-notproperty #'header:poet \vspace #2 \fill-line { \scale #'(4 . 4) \fromproperty #'header:title } \vspace #1 \fill-line { \postscript #"-20 0 moveto 40 0 rlineto stroke" } \vspace #6 \fill-line { \fontsize #5 \fromproperty #'header:date } \when-property #'header:date \vspace #6 \when-property #'header:instrumentation \fill-line { \fontsize #5 \italic \fromproperty #'header:instrumentation } \when-property #'header:instrumentation \vspace #4 \when-property #'header:incipit \fill-line { \fontsize #5 \italic \fromproperty #'header:incipit } \vspace #1 \fill-line { \when-property #'header:arranger \column { \vspace #5 \fill-line { \fontsize #3 \fromproperty #'header:arranger } } } } } } Richard