%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.24.0"

\header {
  categories = "Contexts and engravers, Pitches, Staff notation, Tweaks
                and overrides"

  texidoc = "
LilyPond supports custom key signatures. In this example, print for
D@tie{}minor and D@tie{}major with an extended range of shown flats.
"

  doctitle = "Creating custom key signatures"
} % begin verbatim


\new Staff \with {
  \override StaffSymbol.line-count = #8
  \override KeySignature.flat-positions = #'((-7 . 6))
  \override KeyCancellation.flat-positions = #'((-7 . 6))
  \override KeySignature.sharp-positions = #'((-6 . 7))
  \override KeyCancellation.sharp-positions = #'((-6 . 7))

  \override Clef.stencil =
    #(lambda (grob)
        (grob-interpret-markup grob
           #{ \markup\combine
                \musicglyph "clefs.C"
                \translate #'(-3 . -2)
                  \musicglyph "clefs.F"
           #}))
    clefPosition = #3
    middleCPosition = #3
    middleCClefPosition = #3
}

{
  \key d\minor f bes, f bes, |
  \key d\major fis b, fis b, |
}
