lilypond-user
[Top][All Lists]
Advanced

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

Re: Left align first word of lyrics


From: David Kastrup
Subject: Re: Left align first word of lyrics
Date: Tue, 21 May 2013 14:38:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Gregory Heytings <address@hidden> writes:

>> A tedious solution is likely doable where you basically specify
>> something like
>>
>> \syllable #1 { Cccc Ccccc Cc Ccc c }
>> in the first stanza,
>> \syllable #2 { Cccc Ccccc Cc Ccc c }
>>
>> in the second stanza and so on: then each stanza would typeset the
>> whole column, align it, and pick out the right row.
>>
>
> That's an interesting idea.  A bit tedious as you write, but better
> than nothing however.  Am I right that the \syllable primitive is not
> part of LilyPond, and that this is just an idea of yours?

It is not hard to do:

#(define-markup-command (syllable layout props idx col) (index? markup-list?)
  (let* ((stc (interpret-markup-list layout props col))
         (all (apply ly:stencil-add stc))
         (me (list-ref stc (1- idx))))
   (ly:stencil-add me
    (ly:make-stencil "" (ly:stencil-extent all X) (ly:stencil-extent me Y)))))

\score {
  \new Staff <<
    \new Voice { c' d' e'2 \bar "|." }
    \addlyrics { \markup \syllable #1 { Do Cant Syll } -- mi -- nus, }
    \addlyrics { \markup \syllable #2 { Do Cant Syll } -- a me }
    \addlyrics { \markup \syllable #3 { Do Cant Syll } -- a -- bum! }
  >>
}

But you'll see another complication coming right up...  One will
probably need to use left alignment after all and mess with the left
extent to simulate centering.  But how are you going to define
"centering" when the hyphen sticks out an arbitrary amount?

-- 
David Kastrup




reply via email to

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