[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using lyrics in a markup
From: |
Neil Puttock |
Subject: |
Re: Using lyrics in a markup |
Date: |
Sat, 15 Jan 2011 20:51:44 +0000 |
On 15 January 2011 19:01, Marc Hohl <address@hidden> wrote:
> Now I wonder whether it is possible to create a kind of text book by
> including the lyrics in a markup, perhaps with a scheme function which
> replaces the " -- " by "".
>
> Is it possible to store the text in a variable?
Store the lyrics first, then extract the text from the LyricEvent objects:
\version "2.13.46"
words = \lyricmode { This is my ex -- am -- ple text }
text =
#(map (lambda (x) (ly:music-property x 'text))
(extract-named-music words 'LyricEvent))
melody = \relative c' { c4 d e f | g a c2 }
\new Voice { \melody }
\addlyrics { \words }
#(markup* (make-line-markup text))
For simplicity I've ignored hyphens, but it shouldn't be too difficult
to add them (or use their position in the list of strings to restore
the hyphenated words).
Cheers,
Neil
- Using lyrics in a markup, Marc Hohl, 2011/01/15
- Re: Using lyrics in a markup,
Neil Puttock <=
- Re: Using lyrics in a markup, Marc Hohl, 2011/01/16
- Re: Using lyrics in a markup, Marc Hohl, 2011/01/18
- Re: Using lyrics in a markup, jakob lund, 2011/01/18
- Re: Using lyrics in a markup, Jan-Peter Voigt, 2011/01/18
- Re: Using lyrics in a markup, jakob lund, 2011/01/18
- Re: Using lyrics in a markup, Marc Hohl, 2011/01/18
- Re: Using lyrics in a markup, Graham Percival, 2011/01/18
- Re: Using lyrics in a markup, Marc Hohl, 2011/01/18
- Re: Using lyrics in a markup, Jean-Charles Malahieude, 2011/01/18
- Re: Using lyrics in a markup, jakob lund, 2011/01/19