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: Urs Liska
Subject: Re: centering title and THEN adding something to the left of it
Date: Mon, 16 Dec 2013 09:55:49 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Am 16.12.2013 02:24, schrieb Kieren MacMillan:
I’d like to have the score title (i.e., the whole two-line column) 
automatically centered (i.e., it should be lined up exactly with the book 
title, in this case), and the boxed song number (which may have two or three 
digits in other songs!) “float” to the left accordingly. What’s the easiest way 
to accomplish this, without having to manually tweak each song?

One way is to add something to the right too and hide it by making it white:

\version "2.17.29"


\paper {
bookTitleMarkup = \markup \fill-line { \abs-fontsize #18 \fromproperty #'header:title }
  scoreTitleMarkup = \markup \center-column {
    \fill-line {
{ \abs-fontsize #18 \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 ")" }
          }
{ \with-color #white \abs-fontsize #18 \override #'(box-padding . 0.5) \box \concat { "#" \fromproperty #'header:no } \hspace #0.5 }

    }
  }
}

\header {
  no = "1"
  title = "My Awesome Song"
  performers = "Me and You"
}

\score { c' }


HTH
Urs



reply via email to

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