[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating a stencil from a markup
From: |
David Nalesnik |
Subject: |
Re: Creating a stencil from a markup |
Date: |
Wed, 14 Dec 2016 14:59:34 -0600 |
On Wed, Dec 14, 2016 at 2:57 PM, David Nalesnik
<address@hidden> wrote:
> Hi Simon,
>
> On Wed, Dec 14, 2016 at 2:20 PM, Simon Albrecht <address@hidden> 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
For documentation, look at ly:text-interface::interpret-markup here:
http://lilypond.org/doc/v2.18/Documentation/internals/scheme-functions
- Creating a stencil from a markup, Simon Albrecht, 2016/12/14
- Re: Creating a stencil from a markup, David Nalesnik, 2016/12/14
- Re: Creating a stencil from a markup,
David Nalesnik <=
- Re: Creating a stencil from a markup, Thomas Morley, 2016/12/14
- Re: Creating a stencil from a markup, Pierre Perol-Schneider, 2016/12/15
- Re: Creating a stencil from a markup, Pierre Perol-Schneider, 2016/12/15
- Re: Creating a stencil from a markup, Simon Albrecht, 2016/12/15
- Re: Creating a stencil from a markup, Pierre Perol-Schneider, 2016/12/15
- Re: Creating a stencil from a markup, Simon Albrecht, 2016/12/15
- Re: Creating a stencil from a markup, Pierre Perol-Schneider, 2016/12/15
Re: Creating a stencil from a markup, Simon Albrecht, 2016/12/14