lilypond-user
[Top][All Lists]
Advanced

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

Re: centering title and THEN adding something to the left of it


From: Alexander Kobel
Subject: Re: centering title and THEN adding something to the left of it
Date: Mon, 16 Dec 2013 11:55:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130702 Icedove/17.0.7

On 12/16/2013 11:25 AM, Kieren MacMillan wrote:
Hi all,

Thanks for the help… until someone comes up with a truly “automated” method, 
[...]

Hi Kieren,

how about the following? Uses
- \with-dimensions to fake zero extent for the markup that should not be considered for spacing,
 - \halign to make it right-aligned, and
 - an \hspace inside all that to shift stuff slightly more to the left.
Still quite verbose, but no need to figure out any hspace values manually.

\paper {
bookTitleMarkup = \markup \fill-line { \abs-fontsize #18 \fromproperty #'header:title }
  scoreTitleMarkup = \markup \fill-line {
    \concat {
      \abs-fontsize #18
      \with-dimensions #'(0 . 0) #'(0 . 0) \halign #RIGHT \concat {
\override #'(box-padding . 0.5) \box \concat { "#" \fromproperty #'header:no }
        \hspace #0.5
      }
      \override #'(baseline-skip . 0) \center-column {
        \abs-fontsize #18 \fromproperty #'header:title
\abs-fontsize #13 \concat { "(" \fromproperty #'header:performers ")" }
      }
    }
  }
}


HTH,
Alexander



reply via email to

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