HI all, Thanks for everyone's input. I think that bracket-stencil will do the trick Harm. I'm getting a nice collection of scheme examples now. Hopefully I can work it out myself next time.
All the best, Craig On 3 February 2018 at 08:32, Thomas Morley <thomasmorle...@gmail.com> wrote: > 2018-02-02 6:38 GMT+01:00 Craig Dabelstein <craig.dabelst...@gmail.com>: > > Hi Lilyponders, > > > > Is there a way to put an articulation (a staccatissimo symbol) in square > > brackets above a note, such as [ ! ], where ! = a staccatissimo > > articulation? I've tried several different permutations with no success. > > > > Thanks in advance, > > > > Craig > > > How about below. > Basically it sets new ParenthesesItem.stencils like > http://lsr.di.unimi.it/LSR/Item?id=564 > Overridable in various ways, though. > > \version "2.18.2" > > #(define parentheses-item::bracket-stencils > (lambda (grob) > (let* ((details (ly:grob-property grob 'details)) > (protrusion (assoc-get 'protrusion details 0.2)) > (thick (ly:grob-property grob 'thickness 0.1)) > (shorten-pair (ly:grob-property grob 'shorten-pair '(0 . 0))) > (half-y (magstep (ly:grob-property grob 'font-size))) > (bracket-y-ext > (cons > (- (- half-y (car shorten-pair))) > (- half-y (cdr shorten-pair))))) > (list > (ly:bracket Y bracket-y-ext thick protrusion) > (ly:bracket Y bracket-y-ext thick (- protrusion)))))) > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > %% EXAMPLES > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > \markup "default, sometimes need to tweak ParenthesesItem" > { > c'2-\parenthesize-! > c'2-\parenthesize-. > c'2-\parenthesize-"otto" > c'2-\parenthesize-"-" > } > > \markup "bracket-stencils, sometimes need to tweak ParenthesesItem as well" > { > \override ParenthesesItem.stencils = #parentheses-item::bracket-stencils > > c'2-\parenthesize-! > c'2-\parenthesize-. > c'2-\parenthesize-"otto" > c'2-\parenthesize-"-" > } > > \markup "bracket-stencils, adjusted" > { > \override ParenthesesItem.stencils = #parentheses-item::bracket-stencils > > \once \override ParenthesesItem.font-size = -4 > c'2-\parenthesize-! > > \once \override ParenthesesItem.font-size = -8 > c'2-\parenthesize-\tweak padding #0.3 -. > > \textLengthOn > \once \override ParenthesesItem.font-size = 0 > c'2-\parenthesize-"FOO" > %\override ParenthesesItem.shorten-pair = #'(0.6 . 0.6) > \once \override ParenthesesItem.font-size = -12 > c'2-\parenthesize-"-" > } > > \markup "bracket-stencils, other examples/tweaks" > { > \override ParenthesesItem.stencils = #parentheses-item::bracket-stencils > > \override ParenthesesItem.padding = 0.5 > <c' \parenthesize e' g'> > \override ParenthesesItem.padding = 2 > \override ParenthesesItem.details.protrusion = 0.5 > \override ParenthesesItem.thickness = 0.3 > \override ParenthesesItem.shorten-pair = #'(0.3 . -1) > c'2-\parenthesize-"-" > } > > Cheers, > Harm > -- *Craig Dabelstein* Maxime's Music craig.dabelst...@gmail.com *http://maximesmusic.com <http://maximesmusic.com>*
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user