Hey!

Total hack, but if you check out scm/stencil.scm, you’ll see how parentheses 
are made…

(define-public (parenthesize-stencil
                stencil half-thickness width angularity padding)
  "Add parentheses around @var{stencil}, returning a new stencil."
  (let* ((y-extent (ly:stencil-extent stencil Y))
         (lp (make-parenthesis-stencil
              y-extent half-thickness (- width) angularity))
         (rp (make-parenthesis-stencil
              y-extent half-thickness width angularity)))
    (set! stencil (ly:stencil-combine-at-edge stencil X LEFT lp padding))
    (set! stencil (ly:stencil-combine-at-edge stencil X RIGHT rp padding))
    stencil))

So it looks like you can substitute in make-connected-path-stencil for 
make-parenthesis-stencil, using sensible parameters for the connected path 
based on the y extent and the width.

~Mike


On 5 December 2016 at 16.46.16, Urs Liska (u...@openlilylib.org) wrote:

Hi all,  

I don't seem to find the right thing, neither in the docs, the LSR nor  
the list archive. I need to put square brackets around some accidentals  
in order to differentiate them from default parentheses.  

I don't find the way to create the respective stencil for this.  

It has to be possible to do that \once, and I assume I'll run into the  
situation where I will need both round and square ones within a chord.  

Any help available?  

Thanks  
Urs  


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

Reply via email to