Hi Simon,

On Wed, Dec 14, 2016 at 2:20 PM, Simon Albrecht <simon.albre...@mail.de> wrote:
> Hello everybody,
>
> I’d like to add a caesura sign on top of a barline by modifying the
> barline’s stencil. Here’s my attempt:
>
> %%%%%%%%%%%%%%%%%%
> \version "2.19.49"
>
> {
>   1
>   \once\override BarLine.stencil =
>   #(ly:stencil-combine-at-edge
>      ly:bar-line::print
>      1 ; y-axis
>      1 ; on top
>      (interpret-markup layout props (make-musicglyph-markup
> "scripts.caesura.curved"))
>      2) %padding
>   1
> }
> %%%%%%%%%%%%%%%%%%
>
> However, layout is an unbound variable here (and so is props, I assume). How
> to do it correctly?
>

Try:

{
  1
  \once\override Staff.BarLine.stencil =
  #(lambda (grob)
     (let ((layout (ly:grob-layout grob)))
       (ly:stencil-combine-at-edge
        (ly:bar-line::print grob)
        1 ; y-axis
        1 ; on top
        (interpret-markup
         layout
         (ly:grob-alist-chain grob (ly:output-def-lookup layout
'text-font-defaults))
         (make-musicglyph-markup "scripts.caesura.curved"))
        2))) %padding
  1
}

Best,
David

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to