On 22 sept. 2012, at 20:11, TaoCG <tao_lilypondu...@gmx.net> wrote:

> Is it possible to put put single parentheses around a chord?
> If I parenthesize a chord each note gets a pair of parentheses on its own.
> 
> 

One of many possible hacks...

#(define (parenthesize-elements grob . rest)
(let* ((refp (if (null? rest)
                 grob
                 (car rest)))
       (elts (ly:grob-object grob 'elements))
       (x-ext (ly:relative-group-extent elts refp X))
       (stencils (ly:grob-property grob 'stencils))
       (lp (car stencils))
       (rp (cadr stencils))
       (padding (ly:grob-property grob 'padding 0.5)))

  (ly:stencil-add
   (ly:stencil-translate-axis lp (- (car x-ext) padding) X)   
   (ly:stencil-translate-axis rp (+ (cdr x-ext) padding) X))))

\relative c' {
\override NoteColumn #'stencils = 
#parentheses-item::calc-angled-bracket-stencils
\override NoteColumn #'stencil = #parenthesize-elements
<a c e g>
}


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to