Hi Alex,

On Sat, May 23, 2015 at 5:41 PM, Alex Jones <akjonesjeff...@gmail.com>
wrote:

> Thank you, this works!
>
> It does look a little clunky.
>

I agree--there's too much space.  A simple fix is to use \concat, which
puts items directly beside each other, instead of \line in the original
function:

\version "2.18"

#(define ((time-parenthesized-time up down upp downp) grob)
   (grob-interpret-markup grob
     (markup #:override '(baseline-skip . 0) #:number
       (#:concat (
                   (#:column (up down))
                   #:vcenter "("
                   (#:column (upp downp))
                   #:vcenter ")" )))))





>
> I saw this, which gets the parentheses but doesn’t include the first
> non-parenthesized item.  Can these two items be combined?
>
>
> http://www.lilypond.org/doc/v2.19/Documentation/snippets/staff-notation#staff-notation-time-signature-in-parentheses-_002d-method-3
>
>
Yes, and this will allow you control over the shape of the parentheses:

#(define ((time-parenthesized-time up down upp downp) grob)
   (ly:stencil-combine-at-edge
    (grob-interpret-markup grob
      (markup #:override '(baseline-skip . 0) #:number #:column (up down)))
    X RIGHT
    (parenthesize-stencil
     (grob-interpret-markup grob
       (markup #:override '(baseline-skip . 0) #:number #:column (upp
downp)))
     0.1 0.7 0.7 0.1) ; these numbers affect the parentheses
    0.0 ; padding between columns
    ))


\relative c' {
  \override Staff.TimeSignature.stencil = #(time-parenthesized-time "3" "4"
"6" "8")
  \time 3/4
  b8 b8 gis8 gis4 gis8
}

%%%%

Hope this helps!

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

Reply via email to