|
From: | Alexander Kobel |
Subject: | Re: Typesetting renaissance music |
Date: | Thu, 14 May 2015 08:51:11 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 |
On 2015-05-14 05:09, Murray-Luke Peard wrote:
[...] One is to use the Mensurstriche layout, which has bar lines between staves but not through them. My preferred option is to move the barline up or down if the note is low or high, and split it if the note is in the middle. I've been able to move the barline up and down with the following commands: upBar = { \override Staff.BarLine #'bar-extent = #'(0.5 . 3) } downBar = { \override Staff.BarLine #'bar-extent = #'(-3 . -0.5) } And reset it to normal with fullBar = { \override Staff.BarLine #'bar-extent = #'(-2 . 2) } But I can't figure out how to get the split bar line. Ideally, it would look something like : topPart = { \override Staff.BarLine #'bar-extent = #'(2 . 3) } bottomPart = [ \override Staff.BarLine #'bar-extent = #'(-3 . -2) } but both at the same time! Can anyone suggest how I might achieve this?
Hi Murray-Luke,I had the exact same problem a few days ago, in a different context (read the thread "TimeSignatures over BarLines" from May 07 here: <http://lists.gnu.org/archive/html/lilypond-user/2015-05/msg00276.html>). The problem is that the BarLine is drawn only once, and the most recent extent is taken. There is a solution however: to draw the short BarLine twice, and move one of the instances as necessary. The code is as follows:
\once \override Staff.BarLine #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'bar-extent '(-3 . -2)) (ly:stencil-add (ly:bar-line::print grob) (ly:stencil-translate-axis (ly:bar-line::print grob) 5 Y)))If you want two stubs of different length, you have to work a little bit harder, but this should get you started.
HTH, Alexander
[Prev in Thread] | Current Thread | [Next in Thread] |