[Top][All Lists]

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

Re: Adding line breaks within lyrics

From: Andrew C. Smith
Subject: Re: Adding line breaks within lyrics
Date: Sun, 19 Jun 2011 14:00:46 -0400

Sorry, made more progress than I thought I would. My full explanation is below. Any simplifications (particularly ways to do away with the \markup \column redundancy) would be welcome.

Wrapping lyrics in LilyPond

Markup command:

#(define-markup-list-command (wrap-lyrics layout props line) (markup-list?)
#:properties ((line-width 40))
"Lyric wrapping"
(interpret-markup-list layout props
(make-override-lines-markup-list (cons 'line-width line-width)
(make-wordwrap-lines-markup-list line))))

and invocation:

\lyricmode { 
\markup \column { \wrap-lyrics {these lyrics will be wrapped as if they all belong to the same syllable} }

There is also the possbiility of changing the line width (default is 40) using the following example (line-width changed to 20):

\markup \column { \override-lines #'(line-width . 20) \wrap-lyrics {these lyrics will be wrapped with a narrower line width} }

On Jun 19, 2011, at 12:18 PM, Andrew C. Smith wrote:

Thanks Kieren & James,

This helped a lot. I actually found a lesser workaround later last night, but your solutions were way better.

Continuing this conversation: I'm trying to now make a markup function, and running into trouble. Here's the function:


#(define-markup-command (wrap-lyrics layout props line) (markup?)
#:properties ((line-wrap-width 40))
"Allow lyrics to wrap at the end of the line"
(interpret-markup layout props
(markup #:override '(line-width . ,line-wrap-width) #:column 
(#:wordwrap-lines (line)))))


\markup { \wrap-lyrics {sky's bluer than it seems sky's blue all seeming yet feeling is first yet syntax seems clear} }


However, I get this error:

error: Not a markup command: wordwrap-lines

Any ideas? Running \displayLilyMusic shows that \wordwrap-lines is replaced by:

 #<procedure wordwrap-lines-markup-list (layout props args)> ("world's" "chaos" "when" "we" "seek" "it" "water's" "drifting" "as" "slowly" "out" "tides" "toward" "land" "twice" "daily")

But is there a workaround to let me use this same built-in procedure in my scheme function?

Thanks, and sorry for the gobs of code. Hopefully we'll end up with a snippet in the end.



On Jun 19, 2011, at 10:32 AM, James Lowe wrote:

From: address@hidden address@hidden on behalf of Kieren MacMillan address@hidden
Sent: 18 June 2011 23:08
To: Andrew C.Smith
Cc: LilyPond User Group
Subject: Re: Adding line breaks within lyrics

Hi Andrew,

or to set the max width and tell lilypond to wrap the text?

In markup, I used

   ^\markup \override #'(line-width . 62) \column { \wordwrap-lines { Lorem ipso dolor yadda yadda … } }

I'm assuming you could do the same with LyricText.


Ah, I saw this after I wrote my response.

Yes that was the kind of thing I was looking at, but you can (it seems) incorporate it directly in LyricText object rather that just using it as a markup (which may be more convenient).


lilypond-user mailing list

reply via email to

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