lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird parentheses


From: Aaron Hill
Subject: Re: Weird parentheses
Date: Sun, 23 Sep 2018 14:47:22 -0700
User-agent: Roundcube Webmail/1.3.6

On 2018-09-23 1:37 pm, Simon Albrecht wrote:
Output attached – I don’t know where that whitespace comes from.

The whitespace is due to not having any notes in the staff. I've encountered this before, so you have to remember to put at least one note for the staff lines to connect fully.

But instead of doing markup in a Scheme funtion, there is what I think is a better option:

%%%%
\version "2.19.81"
\new Staff {
  \compoundMeter #'(12 9 8)
  \override Staff.TimeSignature.stencil = #ly:text-interface::print
  \override Staff.TimeSignature.text = \markup {
    \override #'(baseline-skip . 0)
    \number
    \line {
      \center-column { 21 8 }
      \vcenter "("
      \center-column { 12 8 }
      \vcenter "+"
      \center-column { 9 8 }
      \vcenter ")"
    }
  }
  \repeat unfold 2 { b'2. b' b'4. b' b' | }
}
%%%%

Here we build on top of ly:text-interface::print so we can just define a text property as normal markup. There could of course be a way to query the compound meter so that it renders both the parts and the sum, but the above seems to be pretty clear even if it is "hard-coded" a bit.

-- Aaron Hill



reply via email to

[Prev in Thread] Current Thread [Next in Thread]