lilypond-user
[Top][All Lists]
Advanced

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

Re: Changing the car or cdr of a pair


From: Malte Meyn
Subject: Re: Changing the car or cdr of a pair
Date: Mon, 25 Dec 2017 18:21:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0



Am 25.12.2017 um 17:48 schrieb Menu Jacques:
The edge-height pair can be given a value with:

        \once \override Staff.LigatureBracket.edge-height = #'(0 . +0.7)

but how can I change only one of the members of the pair, leaving the other one 
as it is?

There are two options: Either use the \offset command (if you want to add a number to one of the members) or \override before-line-breaking (if you want to replace one of the members without depending on the original value). Both options can be seen in the following code (have a close look to the exact output for difference).

\version "2.19.80"

{
  % this takes the original values and adds 0 to left and 3 to right
  \once \offset edge-height #'(0 . 3) LigatureBracket
  \[ c'1 d' \]

% this takes the originale value for left and sets 3 (not 3+original) for right
  \once \override LigatureBracket.before-line-breaking =
  #(lambda (grob)
     (let* ((orig-height (ly:grob-property grob 'edge-height))
            (orig-left (car orig-height)))
       (ly:grob-set-property! grob 'edge-height (cons orig-left 3))))
  \[ c'1 d' \]
}



reply via email to

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