On Fri, Mar 13, 2015 at 9:27 PM, David Nalesnik <david.nales...@gmail.com>
wrote:

>
>
> On Fri, Mar 13, 2015 at 9:24 PM, David Nalesnik <david.nales...@gmail.com>
> wrote:
>
>>
>>
>> On Fri, Mar 13, 2015 at 8:31 PM, Andrew Bernard <andrew.bern...@gmail.com
>> > wrote:
>>
>>> Why do I get the feeling nobody is going to answer this? In all
>>> seriousness, I don’t know enough about lilypond to know if this is even
>>> possible or not, which is a dark state of ignorance. If the Scheme gods
>>> could let me know if I am barking up an entirely impossible tree, that may
>>> save me from wandering in the wilderness. The archives seem very silent on
>>> this topic.
>>>
>>
>> Look for the documentation of the \postscript command to get you started:
>> http://lilypond.org/doc/v2.19/Documentation/notation/graphic
>>
>> David
>>
>
> Oh, oops, I see that you referenced that command.  Sorry, don't think I
> can be of much help here.
>
>
Spoke too soon:

 \version "2.19.16"

arrowdef = "/arrowdict 14 dict def arrowdict begin
/mtrx matrix def end
/arrow
{ arrowdict begin
/headlength exch def /halfheadthickness exch 2 div def /halfthickness exch
2 div def
/tipy exch def /tipx exch def
/taily exch def /tailx exch def
/dx tipx tailx sub def
/dy tipy taily sub def
/arrowlength dx dx mul dy dy mul add
sqrt def
/angle dy dx atan def
/base arrowlength headlength sub def
/savematrix mtrx currentmatrix def
tailx taily translate angle rotate
0 halfthickness neg moveto
base halfthickness neg lineto base halfheadthickness neg lineto arrowlength
0 lineto
base halfheadthickness lineto base halfthickness lineto
0 halfthickness lineto
closepath
savematrix setmatrix end
} def"

myarrow = #(string-append arrowdef " 0 0 20 4 0.3 1.2 1.2 arrow stroke")

{
  c-\markup { \postscript #myarrow }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to