Jump to content

Drawing circles around various objects: Difference between revisions

From LilyPond wiki
m New category
Tags: Mobile edit Mobile web edit
Replace fingering number fake with a normal markup
 
Line 1: Line 1:
The <code>\circle</code> 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.
The <code>\circle</code> command draws circles around <code>\markup</code> objects. For other objects, specific tweaks may be required, as demonstrated for rehearsal marks and measure numbers.


<lilypond version="2.24">
<lilypond version="2.24">
Line 11: Line 11:
   c2 d^\markup {
   c2 d^\markup {
     \override #'(thickness . 3) {
     \override #'(thickness . 3) {
       \circle \finger 2
       \circle foo
     }
     }
   }
   }
Line 21: Line 21:


[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Scheme]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Scheme]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 07:01, 12 December 2025

The \circle command draws circles around \markup objects. For other objects, specific tweaks may be required, as demonstrated 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 foo
    }
  }
  \override Score.BarNumber.break-visibility = #all-visible
  \override Score.BarNumber.stencil =
    #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
}