2013/7/14 Karol Majewski <karo...@wp.pl>:
> Yes, I tried that before. The point is that I don't want move these 
> engravers, because it messes up the score (no bar numbers, some bar lines 
> missing). Need some other way to insert those repeat signs. I can always put 
> them in \markup { \score } and move them via extra-offset, but maybe there is 
> simpler way?
[..]

Perhaps with the code below:

\version "2.16.2"

% For 2.17.21 change glyphs:
% ".|:" for the starting repeat-sign,
% ":|." for the ending repeat-sign.

startSingleStaffRepeat = {
  % Some effort needed to make it work.
  % The simple command
  %   @samp{\\once \\override Staff.BarLine #'glyph-name = #":|"}
  % doesn't work sufficient.
  \once \override Staff.BarLine #'break-visibility = ##(#t #t #t)
  \once \override Staff.BarLine #'before-line-breaking =
    #(lambda (grob) (ly:grob-set-property! grob 'glyph "|:"))
}

stopSingleStaffRepeat = {
  \once \override Staff.BarLine #'glyph-name = #":|"
}

\new PianoStaff
\relative c' <<
  \new Staff  {
      \time 3/4
      % We need to set the SpanBar-glyph, otherwise the BarLine-glyph from
      % the bottom-Staff would determine the SpanBar-glyph.
      \override PianoStaff.SpanBar #'glyph-name = #"|"
      \startSingleStaffRepeat
      c4 c c|
      \stopSingleStaffRepeat
      c4 c c|
      c4 c c|
      \break
      \startSingleStaffRepeat
      c4 c c|
      \stopSingleStaffRepeat
      c4 c c|
      c4 c c|
    }
  \new Staff
    {
      \time 3/4
      c4 c c |
      \startSingleStaffRepeat
      c4 c c |
      \stopSingleStaffRepeat
      c4 c c |
      \break
      c4 c c |
      \startSingleStaffRepeat
      c4 c c |
      \stopSingleStaffRepeat
      c4 c c |
    }
    \new Staff \repeat unfold 2 {
      c4 c c |
      c4 c c |
      \startSingleStaffRepeat
      c4 c c |
      \stopSingleStaffRepeat
    }
  >>

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to