Thank you, Lukas! This works like a charm! Jun
> 2025/06/02 4:41、Lukas-Fabian Moser <l...@gmx.de>のメール: > > Hi Jun, > > Am 01.06.25 um 14:24 schrieb Jun Tamura: >> I want to achieve something like in the attached example. For the Viola part >> in the example, editorial addition of a series of staccati is indicated with >> the left bracket on the first staccato dot and the right bracket on the last >> staccato dot. I’d like to have a left parenthesis on the first staccato dot >> of a series of staccati and a right parenthesis on the last staccato dot. I >> guess this can be achieved if I can define functions like >> \parenthesizeLeft >> and >> \parenthesizeRight >> but I don’t have enough knowledge about Scheme. >> >> Thanks in advance for your help, and best regards. > > It's a bit tricky to mimic the flexible behaviour of \parenthesize (which can > be given music or a Grob path), but for most cases the following should > suffice: > > \version "2.25.23" > > parenLeft = > \once\override Parentheses.stencils = > #(grob-transformer 'stencils > (lambda (grob stils) > (list (first stils) empty-stencil))) > > parenRight = > \once\override Parentheses.stencils = > #(grob-transformer 'stencils > (lambda (grob stils) > (list empty-stencil (second stils)))) > > { > \parenLeft \parenthesize Script a'-. > \parenRight d'\parenthesize -. > } > > Lukas >