lilypond-user
[Top][All Lists]
Advanced

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

Does the layer property not work across systems?


From: caagr98 caagr98
Subject: Does the layer property not work across systems?
Date: Tue, 11 Sep 2018 15:12:03 +0200

I have a couple of scores with limited space. For readability, I
sometimes draw white outlines around overlapping elements (to cut out
parts of volta brackets or similar). This works fine within the same
system, but in some cases, the overlapping elements (an articulation
and a volta bracket) are in different systems. No matter what I do,
the volta in the second bracket draws above the articulation in the
first. Is there a) some way to draw things over subsequent systems,
and/or b) some better way to solve such overlaps without significantly
affecting the overall layout?

Here's a small example of what I'm trying to do (the real version uses
edition engraver):

```
\version "2.19.82"

whiteout =
#(define-event-function (shape) (list?)
   #{
     \tweak layer #0
     \tweak Y-offset #0
     \tweak outside-staff-priority ##f
     -\markup {
       \with-color #red % Of course, this should be white, but this is
more visible.
       \override #'(filled . #t)
       \path #0 #shape
     }
   #})

\paper {
  #(set-paper-size "a8")
  system-system-spacing.padding = #-1000 % Makes vertical spacing more
even, but encourages overlap
}

{
  \repeat volta 2 {
    e1-^ -\whiteout #'(
      (moveto 0.3 -6.2)
      (rcurveto .8 -1.75 .6 -1.75 1.4 0)
      (closepath))
    \break
  }
  \alternative { {
    \once \override Score.VoltaBracket.layer = #-100
    \once \override Score.VoltaBracket.color = #blue
    R1
  } }
}
```

An image of the result is attached. As you can see, the volta bracket
(blue) is drawn over the note and outline (black + red), despite the
volta being layer #-100 and the outline #0.

Attachment: lily-layer.png
Description: PNG image


reply via email to

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