[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: placement of clef before break
From: |
Malte Meyn |
Subject: |
Re: placement of clef before break |
Date: |
Wed, 8 Mar 2017 09:43:49 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
Am 08.03.2017 um 08:43 schrieb Juan Cristóbal Cerrillo:
> In the following example, I would like to be able to place the clef after the
> repeat barline, and the time signature in parenthesis.
Time signature in parentheses: http://lsr.di.unimi.it/LSR/Item?id=734
For the order of Grobs at the line break there is
BreakAlignment.break-align-orders, it’s three lists (or vectors?) of
symbols you can override:
\once \override Score.BreakAlignment.break-align-orders =
##(
;; end of line
(left-edge cue-end-clef ambitus breathing-sign
cue-clef staff-bar clef
key-cancellation key-signature time-signature custos)
;; unbroken
(left-edge cue-end-clef ambitus breathing-sign
clef cue-clef staff-bar
key-cancellation key-signature time-signature custos)
;; begin of line
(left-edge ambitus breathing-sign clef
key-cancellation key-signature time-signature staff-bar
cue-clef custos))
I took the original list from scm/define-grobs.scm and moved the “clef”
entry in the first sublist to behind staff-bar.
In your case you don’t really need the complete list for a \once
\override because you don’t have ambitus, breathing-sign, key-signature
etc. So the following is sufficient:
\once \override Score.BreakAlignment.break-align-orders =
##((left-edge staff-bar clef time-signature)
()
(left-edge clef time-signature))
I don’t know why (bug?) but the clef before the break isn’t really
nicely positioned so one has to override X-offset to correct this:
\once \override Staff.Clef.before-line-breaking =
#(lambda (grob)
(if (and (ly:item? grob)
(equal? (ly:item-break-dir grob) LEFT))
(ly:grob-set-property! grob 'X-offset 1)))
(I used before-line-breaking here because the override shall only move
the clef before the break.)