Federico Bruni <fedel...@gmail.com> writes: > Il 30/08/2012 03:58, Michael Rivers ha scritto: >> I'm a relatively new LilyPond user, so I apologize if this is something I >> should have found in the manual. I'm trying to use LilyPond to make >> worksheets and theory tests, so I need to hide elements for students to fill >> in themselves. I also need to notate rhythms without a staff. I know that >> rhythms can be notated on a one-line percussion staff, but I really prefer >> the look of no staff with full bar lines. >> >> I've figured out how to hide clefs, time signatures, bar lines and the >> entire staff. My problem is that \stopStaff seems to also hide all bar >> lines. Often, this is what I want, but other times I need the bar lines to >> be visible. Is there another way to hide the staff, or is there a way to >> make the bar lines reappear with \stopStaff? >> >> -Michael >> > > I can't help you. > I've tried the following but it doesn't work. > I wouldn't expect that removing the staff lines only removes also the > bar lines:
It doesn't remove the barlines, but with a height of zero, you are not likely to notice the difference. > \version "2.16.0" > > \relative c' { > \override Staff.StaffSymbol #'line-count = #0 > f4 g a b > % let's try to force the visibility of barlines. Doesn't work.. > \override Staff.BarLine #'stencil = ##t ##t is not a stencil anyway (neither is ##f, but it is a shorthand for "switch it off"). I tried \override BarLine #'bar-extent = #'(-2 . 2) instead (from the definition of RhythmicStaff in ly/engraver-init.ly), but it seems it would need at least one line. However, instead of meddling with the line-count (which also affects layout), you can just let the lines have no appearance: I find that \override Staff.StaffSymbol #'stencil = ##f \override Staff.LedgerLineSpanner #'stencil = ##f seems to do the trick (assuming that you don't want to see ledger lines either; omit the last line if that assumption is wrong). > f4 g a b > } -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user