Jump to content

Controlling formatting of prefatory items: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
mNo edit summary
 
Line 2: Line 2:


<lilypond version="2.24">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=166
\transpose c c' {
\transpose c c' {
   \override Staff.Clef.break-visibility = #end-of-line-visible
   \override Staff.Clef.break-visibility = #end-of-line-visible
Line 30: Line 27:
}
}
</lilypond>
</lilypond>
[[Category:Breaks]]
[[Category:Tweaks and overrides]]
[[Category:Snippet]]

Latest revision as of 05:37, 25 November 2025

This example demonstrates how to place prefatory items (such as the clef and key signature) at the end of a line.

\version "2.24"

\transpose c c' {
  \override Staff.Clef.break-visibility = #end-of-line-visible
  \override Staff.KeySignature.break-visibility = #end-of-line-visible
  \set Staff.explicitClefVisibility = #end-of-line-visible
  \set Staff.explicitKeySignatureVisibility = #end-of-line-visible

  % We want the time sig to take space, otherwise there is not
  % enough white at the start of the line.

  \override Staff.TimeSignature.transparent = ##t
  \set Score.measureBarType = #"-"

  c1 d e f g a b c
  \key d \major
  \break

  % see above.
  \time 4/4

  d e fis g a b cis d
  \key g \major
  \break
  \time 4/4
}