lilypond-user
[Top][All Lists]
Advanced

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

\path vs \postscript


From: luis jure
Subject: \path vs \postscript
Date: Mon, 10 Sep 2012 22:22:26 -0300

hello list,

in the last few days i've been working notating a series of short
fragments including graphical elements like lines, boxes and brackets. i
created them using postscript code embedded in markups. it took a long
time, but finally everything looked great in the pdfs. 

after finishing the work i realized, to my dismay, that nothing of this is
rendered to the svg files that i need to give to the publisher. now i know
that i should have used \path.

the problem is that no matter what i do, i can't make \path "float" over
the staff. even if i can force it to print on the staff, using \override
TextScript #'staff-padding = #'() and \override TextScript #'extra-offset,
the drawing still takes some extra space, and the staff gets displaced.

here's a basic example. how can i get \path behave like \postscript, and
print *on* the staff, without extraneous displacements?


dibujoPS = #"
        newpath
        -1.5 3 moveto
        5 0 rlineto
        0 -10 rlineto
        -5 0 rlineto
        closepath
        0.25 setlinewidth
        stroke"

dibujoPath = 
      #'(( rmoveto -1.5 0 )
         ( rlineto 5 0 )
         ( rlineto 0 -10 )
         ( rlineto -5 0 )
         ( closepath )
         )
           
\relative c'' { 

    b1^\markup{ 
      \postscript #dibujoPS
    }
    b1^\markup{ 
      \path #0.25 #dibujoPath
    }

}


i would greatly appreciate any help on this. in the notation manual i could
find only one example of \path, and it's not related to a staff or any
other element.


best,


lj


Attachment: path.png
Description: PNG image


reply via email to

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