Jump to content

Allowing fingerings to be printed inside the staff: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
By default, vertically oriented fingerings are positioned outside the staff; that behavior, however, may be disabled. Attention needs to be paid to situations where fingerings and stems are in the same direction: by default, fingerings will avoid only beamed stems. That setting can be changed to avoid no stems or all stems; the following example demonstrates these two options, as well as how to go back to the default behavior.
By default, vertically oriented fingerings are positioned outside the staff; that behavior, however, may be disabled. Attention needs to be paid to situations where fingerings and stems are in the same direction: by default, fingerings will avoid only beamed stems. That setting can be changed to avoid no stems or all stems; the following example demonstrates these two options, as well as how to go back to the default behavior.


<lilypond version="2.24.0">
<lilypond version="2.24">
\relative c' {
\relative c' {
   <c-1 e-2 g-3 b-5>2
   <c-1 e-2 g-3 b-5>2
Line 17: Line 17:


[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Fretted strings]]
[[Category:Spacing]]
[[Category:Specific notation]]
[[Category:Specific notation]]
[[Category:Spacing]]
[[Category:Fretted strings]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 12:06, 11 December 2025

By default, vertically oriented fingerings are positioned outside the staff; that behavior, however, may be disabled. Attention needs to be paid to situations where fingerings and stems are in the same direction: by default, fingerings will avoid only beamed stems. That setting can be changed to avoid no stems or all stems; the following example demonstrates these two options, as well as how to go back to the default behavior.

\version "2.24"

\relative c' {
  <c-1 e-2 g-3 b-5>2
  \override Fingering.staff-padding = #'()
  <c-1 e-2 g-3 b-5>4 g'-0
  a8[-1 b]-2 g-0 r
  \override Fingering.add-stem-support = ##f
  a[-1 b]-2 g-0 r
  \override Fingering.add-stem-support = ##t
  a[-1 b]-2 g-0 r
  \override Fingering.add-stem-support = #only-if-beamed
  a[-1 b]-2 g-0 r
}