[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Manipulating lyrics with a music function
From: |
Aaron Hill |
Subject: |
Re: Manipulating lyrics with a music function |
Date: |
Fri, 08 Oct 2021 21:33:55 -0700 |
User-agent: |
Roundcube Webmail/1.4.9 |
On 2021-10-08 8:24 pm, David F. wrote:
macOS 10.14.6, Lilypond 2.22.1
The syntax for adding quotes to lyrics is a little cluttered, so I
thought I’d whip up a couple of little helper functions to tidy things
up. Two hours later I’m reaching out to the mailing list for help.
The example below is failing in two ways. First, I can’t figure out
how to actually interpolate the syllable that is the input to my
functions into the output. Second, the hyphen between the first two
syllables is lost.
Your functions could accept the text as markup. Also, you should
strongly consider using typographer's quotes, which can be input
directly as UTF-8 or using character shorthand neither of which requires
messing about with escaping:
%%%%
\paper { #(include-special-characters) }
\relative { \time 3/4 e'4 e4. e8 d4 e d c2. }
\addlyrics { &elqq;In -- com -- pa -- ra -- ble,&erqq; said she }
openQuote = #(define-scheme-function (text) (markup?) #{ \markup \concat
{ “ #text } #})
closeQuote = #(define-scheme-function (text) (markup?) #{ \markup
\concat { #text ” } #})
\relative { \time 3/4 e'4 e4. e8 d4 e d c2. }
\addlyrics { \openQuote In -- com -- pa -- ra -- \closeQuote ble, said
she }
%%%%
-- Aaron Hill