Maybe the simplest way to achieve this is the good old "!" \language "english" { \key d \major d' e' fs'! g' a' b' cs''! d'' }
On Sun, May 24, 2020 at 6:50 PM Timothy Lanfear <timo...@lanfear.me> wrote: > On 24/05/2020 20:35, Frédéric wrote: > > > > Halas, my web server is under raspberry pi which has only lilypond > > 2.18.2. But 2.18.2 does not give a suitable output (too many natural > > signs). > > Try that: > > \version "2.18.2" > > { > > \override AccidentalCautionary.parenthesized = ##f > > \accidentalStyle teaching > > \key d \major > > d'4 fis' d' fis' d'4 fis' d' fis' > > } > > and you'll get a natural sign on second, third and fourth d. But it's > > perfectly fine on 2.19.84. > > > > Any possibility to install a more recent version of lilypond on > > raspberry or to make it work on 2.18.2? > > > > You could try the attached, which is the 2.20.0 source code for the > teaching accidental style (+some helper functions) with one change to > accommodate 2.18 syntax, i.e. the key signature is obtained from the > localKeySignature context property instead of localAlterations. Thus the > code does not work with Lilypond 2.20.0. Also note the override is no > longer necessary. > > -- > Timothy Lanfear, Bristol, UK. > >