lilypond-user
[Top][All Lists]
Advanced

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

Re: automatic line-breaking in markup


From: Simon Albrecht
Subject: Re: automatic line-breaking in markup
Date: Wed, 3 Feb 2016 19:40:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 03.02.2016 19:24, Jonathan Scholbach wrote:
I want to create a template for a cover page. I do that by redefining bookTitleMarkup. The title of the piece is stored as string in a variable

If there’s no particular need for that, I’d use a normal header block and \fromproperty.

and I want to print it relatively tall on the cover page. It works.
But sadly when the title is too long it runs off the page, because LilyPond does not automatically break the line. How can I get LilyPond to break the line automatically when the title runs off page?

Try this:

%%%%%%%%%%%%%%
\version "2.19.22"

\paper {
  bookTitleMarkup = \markup {
    \fontsize #15 \wordwrap-field #'header:title
  }
}

\book {
  \header {
title = "Many many words may result in a title that is too long for one line"
  }
  \relative c' { c d e f }
}
%%%%%%%%%%%%%%%

I don’t know how to center-align the wrapped lines, though… Anyone?

Best, Simon



reply via email to

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