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: David Kastrup
Subject: Re: centering title and THEN adding something to the left of it
Date: Mon, 16 Dec 2013 11:52:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> Hi all,
>
> Thanks for the help… until someone comes up with a truly “automated”
> method, I’m simply going to hand-code the extra spacing “strut", e.g.

It does not get a price for being pretty and requires the markup changes
committed late in the 2.17 cycle (2.17.29 is probably ok), and don't
expect collision avoidance for the number, but here goes:

\version "2.17.29"

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

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

\score { c' }

-- 
David Kastrup

reply via email to

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