align outside-staff grobs vertically in staff groups
In any context in which a Vertical_align_engraver creates a
StaffGrouper, it also sees to it that all outside-staff grobs created
in the immediate context become y-axis children of the StaffGrouper.
Any such grobs which are later processed by the after-line-breaking
callback ly:side-position-interface::move_to_extremal_staff are moved
to the extremal staff of the group, not of the entire system.
http://codereview.appspot.com/331650043
Originally created by: *anonymous
Originally created by: janek.li...@gmail.com
This has been reported two times in lilypond-user.
"Mark_engraver" or "Metronome_mark_engraver" should be moveable to the
StaffGroup (and alike: GrandStaff, ChoirStaff, etc.) context (and work!!).
%%%% Snippet \version "2.13.24" music = \repeat unfold 5 { \repeat unfold 5 c'1 \mark \default } \score { << \new Staff { s1*0^"Marks should NOT be above this Staff (i.e. above the Score)!" \music } \new StaffGroup { << \new Staff { s1*0^"Marks should be above the StaffGroup" \music } \new Staff { \music } >> } >> \layout { \context { \Score \remove "Mark_engraver" % same for "Metronome_mark_engraver" \remove "Staff_collecting_engraver" } \context { \StaffGroup \consists "Mark_engraver" \consists "Staff_collecting_engraver" % same for "Metronome_mark_engraver" } } } %% Note that it works if we move it to the Staff level (instead of the %% StaffGroup). But engravers at the StaffGroup level is required for %% example if the first staff of the StaffGroup is removed, using %% \RemoveEmptyStaves (Frenched score). \score { << \new Staff { s1*0^"Marks are not above the score" \music } \new StaffGroup { << \new Staff \with { \consists "Mark_engraver" } { s1*0^"Marks are above this Staff" \music } \new Staff { \music } >> } >> \layout { \context { \Score \remove "Mark_engraver" \remove "Staff_collecting_engraver" } \context { \Staff % \consists "Mark_engraver" % We add this engraver to the second Staff only \consists "Staff_collecting_engraver" } } } %%%% End of the snippet
Originally posted by: k-ohara5...@oco.net
(No comment was entered for this change.)
Summary: Mark_engraver in StaffGroup misplaces marks at top of Score
Originally posted by: x.sche...@gmail.com
Also applies to "Metronome_mark_engraver".
Originally posted by: rand...@randallwest.com
would really like to see this... important for orchestral scores!
Originally posted by: k-ohara5...@oco.net
This is frustrating, because this seems to be the entire purpose of the Staff_collecting_engraver, but it seems to have not worked for a long time.
In the development version, you can uncover the remaining functionality by adding
...
\context { \StaffGroup
...
\override RehearsalMark #'after-line-breaking = #'()
% and for 2.17.18
\override RehearsalMark #'Y-offset = #side-position-interface::y-aligned-side
\override RehearsalMark #'padding = #0.7
The data structures are not correct, though, so the rehearsal marks collide with anything else above the staff (which might not happen so often)
For now, the user-defined MarkLine context works well
<https://lists.gnu.org/archive/html/lilypond-user/2012-01/msg00556.html>
Originally posted by: kris7top...@gmail.com
The same issue happens with Bar_number_engraver, too. The suggested workaround by setting after-line-breaking, Y-offset and padding works, although there are some collisions.
Originally posted by: dak@gnu.org
The nature of the workaround would suggest that
commit [r4cabd2305eda952e2d29e4a04e75e1cfb499257a]
Author: Joe Neeman <joeneeman@gmail.com>
Date: Mon Aug 10 10:21:42 2009 +1000
Move rehearsal marks, etc. to the top staff.
would be responsible here. That would imply that 2.13.4 was the first version where the above example stopped working.
Any idea what the exact problem was that the above was trying to cure? I can't find an issue associated with that commit.
Cc: joenee...@gmail.com
Originally posted by: kris7top...@gmail.com
A couple weeks ago I tried playing around with changing side-position-interface::move-to-extremal-staff to instead move to the topmost (i.e. first seen) staff collected by Staff_collecting_engraver. The result is bad alignment, and a warning that the StaffSymbol lacks the axis-group-interface, which is kinda true, since Staff_collecting_engraver collects StaffSymbols, not VerticalAxisGroups.
I guess the problem 4cabd230 is trying to solve is that grobs with side-position-interface need to be in the same axis-group as the grob they are positioned relative to (does this make any sense? I am unfamiliar with the grob positioning code, so I might be entirely misguided.) In that case, the "true" solution would probably be to get the Staff associated with the topmost StaffSymbol collected by Staff_collecting_engraver, fetch its VerticalAxisGroup (made by Axis_group_engraver), and assign the side-positioned grob to that in side-position-interface::move-to-extremal-staff. This sound like an idea I might try out if I'll have time...
Originally posted by: joenee...@gmail.com
IIRC, the purpose of the change was so that you could use outside-staff-priority to put the rehearsal marks under other outside-staff grobs. If RehearsalMark has System as its parent then this doesn't work.
Originally posted by: k-ohara5...@oco.net
While it is true that version 2.12 suffers this bug,
which was before the patch mentioned in comment 7
Date: Mon Aug 10 10:21:42 2009 +1000
Move rehearsal marks, etc. to the top staff.
fixing this bug will almost certainly require re-writing that patch.
Originally posted by: simon.al...@mail.de
LSR snippet 1010 has an updated snippet for Shevek’s MarkLine context workaround, linked to above in comment #5.
Last edit: Simon Albrecht 2018-02-11
Issue 2199: align outside-staff grobs vertically in staff groups
In any context in which a Vertical_align_engraver creates a
StaffGrouper, it also sees to it that all outside-staff grobs created
in the immediate context become y-axis children of the StaffGrouper.
Any such grobs which are later processed by the after-line-breaking
callback ly:side-position-interface::move_to_extremal_staff are moved
to the extremal staff of the group, not of the entire system.
http://codereview.appspot.com/331650043
Passes make, make check and a full make doc.
Reg test diff attached (remember to ignore those jumping dots!)
If there is more wrong than the dot placement, I would be grateful for some clarification.
Hi Dan,
rest-dot-position.ly will always pop up until the cause for random behaviour is fixed.
See:
https://sourceforge.net/p/testlilyissues/issues/5226/
Here the cause is hunted down:
https://sourceforge.net/p/testlilyissues/issues/5217/#125c
Diff:
Patch on countdown for March 2nd.
Patch counted down - please push.
commit 6a4031b4ec2411270b0c24bef02ee58ec2a26470 (origin/staging, pushed/issue-2199-marks-in-staff-group)
Author: Dan Eble nine.fierce.ballads@gmail.com
Date: Fri Feb 23 20:19:57 2018 -0500
commit 622cab6a34e471a83745d945874385b39d8b9458
Author: Dan Eble nine.fierce.ballads@gmail.com
Date: Thu Feb 22 23:53:23 2018 -0500
If I understand correctly this makes the workaround using a MarkLine context (snippet 1010) unnecessary. IMHO that’s worth an entry in Changes, isn’t it?