[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Change color for some symbols in a sylable
From: |
Carl Sorensen |
Subject: |
Re: Change color for some symbols in a sylable |
Date: |
Mon, 9 Jan 2012 23:47:36 +0000 |
User-agent: |
Microsoft-MacOutlook/14.13.0.110805 |
On 1/9/12 3:59 PM, "Francisco Vila" <address@hidden> wrote:
>2012/1/9 Светлана <address@hidden>:
>> 10.01.2012, 00:01, "Francisco Vila" <address@hidden>:
>>> Use complex markups as syllables.
>>>
>>> { c' } \addlyrics { \markup { \concat { \with-color #red "A" "bc" } } }
>>>
>>> --
>>> Francisco Vila. Badajoz (Spain)
>>> www.paconet.org , www.csmbadajoz.com
>>
>> Well, thank you, that works! But each score has at least 30 syllables
>>and each of them has 1 or 2 colored letters... quite a mess in the
>>code... Could there be any way to make this shorter and readable?
>
>Are the coloured symbols always the first ones in a given syllable?
>Then a simple scheme function that takes two arguments could work.
>
>#(define-markup-command (firstred layout props sone stwo) (string?
>string?)
> "Print the first string in red"
> (interpret-markup layout props
> (markup #:concat ((#:with-color red sone) stwo))))
>
>{ c' c' c' c' }
> \addlyrics {
>
> \markup \firstred #"A" #"bc"
> Def
> Ghi
> \markup \firstred #"Jk" #"l"
>}
One could also do the following
#(define-markup-command (center_red layout props sone stwo sthree)
(string? string? string?)
"Print the middle string in red"
(interpret-markup layout props
(markup #:concat (sone (#:with-color red stwo) sthree))))
{ c' c' c' c' }
\addlyrics {
\markup \center_red #"A" #"bc" #""
Def
\markup \center_red #"" #"G" #"hi"
\markup \center_red #"J" #"k" #"l"
}
Or one could define three markup commands: first_red, center_red, and
last_red.
HTH,
Carl
- Change color for some symbols in a sylable, Светлана, 2012/01/09
- Re: Change color for some symbols in a sylable, Francisco Vila, 2012/01/09
- Re: Change color for some symbols in a sylable, Светлана, 2012/01/09
- Re: Change color for some symbols in a sylable, Jakub Pavlík, 2012/01/09
- Re: Change color for some symbols in a sylable, Francisco Vila, 2012/01/09
- Re: Change color for some symbols in a sylable,
Carl Sorensen <=
- Re: Change color for some symbols in a sylable, David Nalesnik, 2012/01/09
- Re: Change color for some symbols in a sylable, Светлана, 2012/01/10
- Re: Change color for some symbols in a sylable, David Nalesnik, 2012/01/10
- Re: Change color for some symbols in a sylable, Светлана, 2012/01/10
- Re: Change color for some symbols in a sylable, David Nalesnik, 2012/01/10
- Re: Change color for some symbols in a sylable, Светлана, 2012/01/11
- Re: Change color for some symbols in a sylable, Christopher R. Maden, 2012/01/11
- Re: Change color for some symbols in a sylable, David Nalesnik, 2012/01/11
- Re: Change color for some symbols in a sylable, David Nalesnik, 2012/01/11
- Re: Change color for some symbols in a sylable, Светлана, 2012/01/10