Jump to content

Drawing circles around various objects: 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
No edit summary
Line 23: Line 23:
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Scheme]]
[[Category:Scheme]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]][[Category:Snippet]]

Revision as of 22:52, 21 November 2025

The \circle markup command draws circles around various objects, for example fingering indications. For other objects, specific tweaks may be required: this example demonstrates two strategies for rehearsal marks and measure numbers.

\version "2.24"

\relative c' {
  c1
  \set Score.rehearsalMarkFormatter =
    #(lambda (mark context)
             (make-circle-markup (format-mark-numbers mark context)))
  \mark \default

  c2 d^\markup {
    \override #'(thickness . 3) {
      \circle \finger 2
    }
  }
  \override Score.BarNumber.break-visibility = #all-visible
  \override Score.BarNumber.stencil =
    #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
}